
CreateEGLGraphicsMode should select the correct renderer
Posted Monday, 17 January, 2011 - 16:40 by jdomnitz| Project: | The Open Toolkit library |
| Version: | 1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | in progress (review) |
Jump to:
Description
According to the documentation, choose config looks for a RENDERABLE_TYPE that is >= the one specified. Therefore only the OPENGL_ES2_BIT should be specified in the attributes to ensure opengl es 2.0 only configurations can be used.


Comments
#1
Wouldn't this drop support for ES1 configurations? I don't think that's desirable.
#2
What's the intent, to get any configuration and if possible an ES2 one? The configurations may exclude each other, for example only an ES2 context may be provided.
#3
Considering OpenTK has GL ES 1.0 and 1.1 support disabled yea I think so... maybe allow the ES 1 bit to be set if "EXPERIMENTAL" is set. In either case the VG bit should be dropped since it could eliminate valid es 2 configs that just don't support open vg
#4
Are we looking at the same versions? :) As far as I can tell, neither is the VG bit set nor are ES 1.0/1.1 disabled in trunk.
The main issue is that we don't know which ES version the user is planning to use when querying GraphicsModes. One solution would be to use Egl.GetConfigs() to build a list of available modes and return the closest match with the highest version number.
#5
The current query
Egl.RENDERABLE_TYPE, Egl.OPENGL_ES_BIT | Egl.OPENGL_ES2_BIT
seems to mean "return configurations that support OpenGL/ES *and* OpenGL/ES2" which excludes both OpenGL/ES-only as well as OpenGL/ES2-only configurations. I can't really extract it like this from the docs, though the original posting in this thread makes sense like that.
#6
That's on purpose, since we don't actually know which ES version the user will try to use.
Now that I think about this, the cleanest solution would be to avoid choosing a specific config in EglGraphicsMode and instead move that choice into the EglContext constructor (where we have all necessary information). Trying to choose a specific config without all necessary information will always result in fuzziness or limitations.
#7
That's on purpose, since we don't actually know which ES version the user will try to use.
Well you are killing all ESv2-only setups, which seem to be quite a lot (choose config returns false or 0 configurations). I don't think the current logic works at all.
#8
Sorry meant openGL bit instead of openVG bit.... the openGL bit makes it completely non-functional on real hardware
and whoops...was looking at an old version of code - i take back the opengl 2 only comment
I can tell you that real hardware has egl1 and egl2 only configs so the current way of doing things is broken
#9
I have added the renderer as an explicit parameter to EglGraphicsMode.SelectGraphicsMode(). Can someone please confirm that r3060 fixes this issue?