开发者

EGL_BAD_MATCH with Droid/Droid 2

开发者 https://www.devze.com 2023-04-07 01:50 出处:网络
I\'ve been testing my OpenGL ES 2 app on various phones. I\'ve ran into a problem with开发者_Go百科 the Droidand Droid 2. Every EGL config I try results in an EGL_BAD_MATCH.

I've been testing my OpenGL ES 2 app on various phones. I've ran into a problem with开发者_Go百科 the Droid and Droid 2. Every EGL config I try results in an EGL_BAD_MATCH.

I've tried many combinations of EGL configurations, including configurations that work on other phones, and every combination results in an EGL_BAD_MATCH.

Has anyone ran into this problem or know of any solutions?

Thanks


I also had this problem on select Motorola and Samsung handsets. The problem is the phone reports a different pixel format than the surface is expecting. You need to setup the surface view with the appropriate pixel format for that phone, which is most likely PixelFormat.RGB565

Kevin


It is not an issue of handsets types, this issue can be on any handset and i don't know weather this problem is related to pixelFormat. But, I have solved it by deleting current emulator and create new emulator. If you deploy application on your device then you have to reboot your device.


Ensure you have set EGL_PBUFFER_BIT for the EGL_SURFACE_TYPE in the attributes passed into eglChooseConfig() call.

0

精彩评论

暂无评论...
验证码 换一张
取 消