According to the EGL spec I think this is correct behavior. Thanks for posting the Droid EGLConfigs - I had been wondering about them for the past couple days and this confirms Craig's issue.
I bet if you looked at the EGL_CONFIG_CAVEAT attribute, the RGBA8888 configs will be EGL_NON_CONFORMANT_CONFIG. Passing EGL_CONFIG_CAVEAT=EGL_NONE as your desired configuration should filter out the RGBA8888 configs assuming my assertion is true. Ernest Woo Woo Games http://www.woogames.com On Nov 9, 5:07 am, a1 <[email protected]> wrote: > On 9 Lis, 10:13, "Michael Leahy (Tactel US)" > > > > > > <[email protected]> wrote: > > Greets, > > > As with a lot of folks doing OpenGL ES dev it's really a test on > > device situation. I'm really trying to get out the Typhon API (http:// > > typhon.egrsoftware.com/) which is an open source platform for real > > time / game development working on the Droid. It also provides the > > basis for a series of OpenGL ES tutorials for Android available that > > will be incrementally released starting this week with or without > > support for the Droid:http://android-tactelus.com/ > > > Of course I'd like to support Android 2.0 / Motorola Droid, but alas a > > problem without a clear answer is occurring when I use EGL/GL directly > > not using Google/Android provided GLSurfaceView. The following is the > > basic setup code and works just fine on all previous Android versions > > including 1.6 on the G1 and Ion, but it fails on the Droid. Note > > "context.getConfigSpec()" returns a standard configuration: > > > new int[] > > { > > EGL10.EGL_RED_SIZE, 5, > > EGL10.EGL_GREEN_SIZE, 6, > > EGL10.EGL_BLUE_SIZE, 5, > > EGL10.EGL_NONE > > > } > > > Now for the EGL/GL setup code... > > > // > > --------------------------------------------------------------------------- > > ------------------ > > egl = (EGL10) EGLContext.getEGL(); > > glDisplay = egl.eglGetDisplay(EGL11.EGL_DEFAULT_DISPLAY); > > > int[] version = new int[2]; > > egl.eglInitialize(glDisplay, version); > > > EGLConfig[] configs = new EGLConfig[1]; > > int[] numValue = new int[1]; > > > egl.eglChooseConfig(glDisplay, context.getConfigSpec(), configs, 1, > > numValue); > > glConfig = configs[0]; > > First of all I have very similar issue (and some other devs as well), > in this case > returned config will be RGBA8888 D0 S0 (basically 32bit without depth/ > stencil buffer), > while default window configuration is RGB565, (PixelFormat.OPAQUE > which is translated to RGB565 > during surface creation). This cause incompatibile pixel format error. > So simplest solution was > to implement some config matching to select correct config. > > But there is one more trap, my game uses depth buffer so in my config > template I also > added DEPTH_SIZE, 16, on droid eglChooseConfig will list folowing: > > D/GLView ( 1468): Testing config RGBA8888 D24 S8, match distance 24 > D/GLView ( 1468): Testing config RGBA8888 D24 S8, match distance 24 > D/GLView ( 1468): Testing config RGBA8888 D24 S8, match distance 24 > D/GLView ( 1468): Testing config RGBA8888 D24 S8, match distance 24 > D/GLView ( 1468): Testing config RGB565 D24 S8, match distance 8 > D/GLView ( 1468): Testing config RGB565 D24 S8, match distance 8 > D/GLView ( 1468): Testing config RGB565 D16 S0, match distance 0 > D/GLView ( 1468): Testing config RGBA8888 D16 S0, match distance 16 > D/GLView ( 1468): Choosed config RGB565 D16 S0 > D/GLView ( 1468): Surface changed, current format RGB565 > E/IMGSRV ( 1468): gralloc.c:102: validate_handle: Unsupported usage > bits (0xFHWR=0x47554000) set on handle > E/libagl ( 1468): connect() failed to lock buffer 0x13096c (320x569) > I/ActivityManager( 1028): Displayed activity > com.beepstreet.blockx_trial/.menu.MenuActivity: 809 ms (total 809 ms) > E/libEGL ( 1468): call to OpenGL ES API with no current context > (logged once per thread) > E/libEGL ( 1468): call to OpenGL ES API with no current context > (logged once per thread) > E/libEGL ( 1468): call to OpenGL ES API with no current context > (logged once per thread) > E/libEGL ( 1468): call to OpenGL ES API with no current context > (logged once per thread) > > Please note that my code selected RGB565 D16, and unfortunatelly this > is no go, > since I have no access to droid itself (and above logcat output was > provided by > google engineer), I'm gessing that both condigs (RGBA8888 D16 and > RGB565 D16) are > backward compatibility configs which do not support natvie rendering. > > -- > Regards, > Bart Januszwww.beepstreet.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

