Code: Select all
const EGLint attrib_list[] =
{
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, 8,
EGL_DEPTH_SIZE, 24,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_NONE, EGL_NONE
};
EGLint numConfigs;
if( !eglChooseConfig(m_display,attrib_list,&m_config,1, &numConfigs) )
{
printf("Error: eglGetConfigs() failed\n");
return false;
}
if( numConfigs > 0 )
{
EGLint bufSize,r,g,b,a,z,s = 0;
eglGetConfigAttrib(m_display,&m_config,EGL_BUFFER_SIZE,&bufSize);
eglGetConfigAttrib(m_display,&m_config,EGL_RED_SIZE,&r);
eglGetConfigAttrib(m_display,&m_config,EGL_GREEN_SIZE,&g);
eglGetConfigAttrib(m_display,&m_config,EGL_BLUE_SIZE,&b);
eglGetConfigAttrib(m_display,&m_config,EGL_ALPHA_SIZE,&a);
eglGetConfigAttrib(m_display,&m_config,EGL_DEPTH_SIZE,&z);
eglGetConfigAttrib(m_display,&m_config,EGL_STENCIL_SIZE,&s);
printf("%d Configs found:\n\tFrame buffer(%d) RGBA(%d %d %d %d)\n\tZBuffer(%d) Z(%d) S(%d)\n\n",numConfigs,bufSize,r,g,b,a,z+s,z,s);
return true;
}
1 Configs found:
Frame buffer(0) RGBA(1073909760 0 0 0)
ZBuffer(0) Z(0) S(0)
Now that can't be correct??? What am I doing wrong?
Ta.