Would love to submit a few patches, such as MSAA and CSAA support, but there is one thing I don't I understand about the GLES2 RenderSystem, specifically AndroidEGLWindow.
In EGLSupport::selectGLConfig ... only the minAttribs are passed to EGLSupport::chooseGLConfig where the actual call to eglChooseConfig is made. Afterwards, the maxAttribs are iterated using the GLConfigAttribs helper class. As far as I understand, this class just makes some eglGetConfigAttrib calls in its load method. The end result is that the minAttribs are the ones chosen by EGL, and some devices will end up rendering in 16 bit color. For a while I just hardcoded EGL_BUFFER_SIZE and was fine with it, but now I'm introducing more attribs (like EGL_SAMPLE_BUFFERS, EGL_SAMPLES, etc) and I end up sticking them in minAttribs, but I'm wondering if there's something I'm missing or just completely misunderstanding about maxAttribs?
Thanks for your time!
maxAttribs in AndroidEGLWindow
-
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 139
-
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 139
Re: maxAttribs in AndroidEGLWindow
JIRA: https://ogre3d.atlassian.net/browse/OGRE-333
Pull request: https://bitbucket.org/sinbad/ogre/pull- ... ption/diff
That should solve the color buffer size issue. I'll add MSAA/CSAA next if this is approved, but the way it has to work is by trying to set CSAA first and catching the resulting exception if it fails. This is because of the way EGLSupport::chooseGLConfig works, which I don't want to mess with, and also at that point there's no context so we can't check GL_RENDERER/GL_VENDOR. If it does fail, it falls back to MSAA. If that fails it falls back to default attribs.
Pull request: https://bitbucket.org/sinbad/ogre/pull- ... ption/diff
That should solve the color buffer size issue. I'll add MSAA/CSAA next if this is approved, but the way it has to work is by trying to set CSAA first and catching the resulting exception if it fails. This is because of the way EGLSupport::chooseGLConfig works, which I don't want to mess with, and also at that point there's no context so we can't check GL_RENDERER/GL_VENDOR. If it does fail, it falls back to MSAA. If that fails it falls back to default attribs.
-
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 139
Re: maxAttribs in AndroidEGLWindow
CSAA/MSAA pull request: https://bitbucket.org/sinbad/ogre/pull- ... pport/diff
Results of anti aliasing are not bad. In the screen below, no AA on the left, CSAA in the middle, and MSAAx4 on the right.
Results of anti aliasing are not bad. In the screen below, no AA on the left, CSAA in the middle, and MSAAx4 on the right.
You do not have the required permissions to view the files attached to this post.