Hi,
I'm developing Live Wallpaper using OpenGL ES2.0 for Android.
The prototype works fine on Adreno205.
However, it doesn't work on Adreno200.
I can't get EGLSurface on Adreno200.
int[] configAttribs = { EGL10.EGL_RED_SIZE, 8, EGL10.EGL_GREEN_SIZE, 8, EGL10.EGL_BLUE_SIZE, 8, EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL10.EGL_NONE }; egl.eglChooseConfig(display, configAttribs, configs, numConfigs, num_config);
It works,but eglCreateWindowSurface always returns "EGL10.EGL_NO_SURFACE".
When I removed this line:
EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
use 565 format, or write proper config chooser checking for available surface format, 888 can crash some devices, and as far as i know safest choice is 565, there are some nice examples on how to achieve this, just search for configchooser.
Hi, Kazuhiko.
It seems that you choose some incompatible config. It may be a RGBX (8880) config, that not supported at most devices.
Are you set the surface pixel format when SurfaceView is created? ( SurfaceView.getHolder().setFormat( PixelFormat.### ); )
You need to do some steps if you want to create egl window surfaces on all devices without problems.
1. Set the surface pixel format ( setFormat( PixelFormat.### ) ) when SurfaceView is created. Android support says that it's not necessary now, but they lie. :)
2. Choose compatible egl config. If you set RGBA_8888 pixel format, that you need to choose 8888 config. If pixel format is RGB_565, that config must be 565. You need to set size of all color channels and it will better if you set buffer size attrib to.
3. EGL_NATIVE_VISUAL_ID attrib of choosed config must be identical as choosed pixel format or 0. It will much better if you set this attrib to.