jdomnitz's picture

CreateEGLGraphicsMode should select the correct renderer

Project:The Open Toolkit library
Category:bug report
Status:in progress (review)

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.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture


Wouldn't this drop support for ES1 configurations? I don't think that's desirable.

c2woody's picture


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.

jdomnitz's picture


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

the Fiddler's picture


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.

c2woody's picture


The current query
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.

the Fiddler's picture


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.

c2woody's picture



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.

jdomnitz's picture


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

the Fiddler's picture


Title:CreateEGLGraphicsMode still incorrect» CreateEGLGraphicsMode should select the correct renderer
Version:all versions» 1.x-dev
Status:open» in progress (review)

I have added the renderer as an explicit parameter to EglGraphicsMode.SelectGraphicsMode(). Can someone please confirm that r3060 fixes this issue?