Hi Hartmut, On Fri, Jul 22, 2011 at 4:09 PM, Hartmut Seichter <[email protected]> wrote: > In general I think there quite some subtle differences between WGL, GLX, CGL > and EGL. Because EGL tries to be everybody darling things are a bit > long-winded and especially real embedded hardware can be fiddly. Also, EGL > does allow OpenVG contexts or shared contexts between GLES and VG, and in > that case you need a bound surface+context to create another (OpenVG) > context that you can add.
I don't yet understand the need for the make current where you have put it, as the next call in an OSG application would be a make current. The fact you have added suggest to me that some OpenGL calls are happening after GraphicsWindowX11::init() but before the GraphicsWindowX11::makeCurrent(), in which ase this a bug elsewhere. >>> Regarding the EGL_<COLOR>_SIZE items. This might be a driver issue, but I >>> have enough devices here to see similar behavior with them - actually >>> leaving things at 0 (default) is probably the best way to handle that. >>> What >>> happens is that eglChooseConfig creates some random config just to >>> satisfy >>> some items in your attributes and a subsequent eglCreateWindowSurface >>> fails >>> then with a "Bad Config" error. >>> >>> EGL_DEPTH_SIZE seemingly works with value of 1. >>> >>> My tests are on a N900 and a few other devices. >> >> I really don't feel comfortable with just leaving the RGBA all to >> defaults, and explictly setting a value 0 certainly doesn't sound like >> default. It seems wrong to me. Could you please documentation that >> this is appropriate for EGL that lead down the path you have taken? > > Please read the EGL documentation at Khronos, default is 0 or if you don't > want to set it its EGL_DONT_CARE like I had in my earlier patch - > http://www.khronos.org/files/egl-1-4-quick-reference-card.pdf Thanks for the refernce page. This page doesn't specify a default for the RGBA, but does explict say that a value 0 means no red/green/blue/alpha channel in the colour buffer. If your drivers are working with these 0 settings then it's almost certainly a bug in the driver. Could you try values of 8 for red, green and blue? These are the defaults under other windowing combinations. >> >> The original code passes on the Traits::red, green, blue and alpha >> values when creating a GLX context. The present code in svn/trunk >> doesn't do this for EGL but does it correctly for GLX, so I would have >> though we should be passing on these values rather than just leave the >> values of 1. > > I have tested and I am 100% sure that on the devices here setting it to 1 > will not work for ES1 nor for ES2. We can argue that it should actually find > a correct one (and in the meantime point fingers at GLES driver > implementers) but you are probably better off with the EGL default (0) or > declaring it as EGL_DONT_CARE (-1) which usually finds a matching visual. I > had a quick try with traits-><color> and didn't got it working. I think the > traits relaxation kicked in for X11 and subsequently the values in the > traits are not the actual ones of the visual. I will have another try later. The right thing to do would be to use the Traits values, and if this fails to create a valid context then resort to using EGL_DONT_CARE, but even this isn't really correct. If users want to use EGL_DONT_CARE then it'd be appropriate to use that in an explict setting of the Traits to EGL_DONT_CARE. If we have a buggy drivers that required red, green, blue and alpha values of 0 then this could also be passed in. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
