[android-developers] Re: problem getting current EGL config
Never mind, after an hour more googling I found out that
eglQueryContext() is probably just another thing that's FUBAR in
Android EGL implementation. It appears that it basically returns a
random config ID.
On Sun, Jul 15, 2012 at 4:04 PM, Latimerius <l4t1m3r1us@googlemail.com> wrote:
> I'm using code to query the current EGL config similar to this:
>
> int [] curConfigId = new int [1];
> egl.eglQueryContext (curDisp, curCtxt, EGL11.EGL_CONFIG_ID, curConfigId);
>
> EGLConfig [] cfgs = new EGLConfig [1];
> int [] numCfgs = new int [1];
> egl.eglChooseConfig (curDisp, new int [] { EGL11.EGL_CONFIG_ID,
> curConfigId[0], EGL11.EGL_NONE }, cfgs, 1, numCfgs);
>
> It's hard to get detailed info on EGL but for all I know, this should
> work - except that it doesn't. In particular, the EGLConfig this gets
> me has a 16bit depth buffer whereas actually there are no ancillary
> buffers attached to the current context or surface.
>
> In contrast, if I just run eglChooseConfig(), requesting the first
> config with RGB 565, I get the current config.
>
> (I can tell if I got the correct EGLConfig because I use it then to
> make a pbuffer which I subsequently eglMakeCurrent() with the current
> EGLContext. This fails with EGL_BAD_MATCH (I think) if the config
> used to create the pbuffer was not compatible with the current
> context's config.)
>
> Am I messing up somewhere, or is this a bug in Android EGL implementation?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home