4th parameter value of eglGetConfigAttrib

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
leekihyun
Posts: 8
Joined: Mon Jun 04, 2012 5:11 am

4th parameter value of eglGetConfigAttrib

Post by leekihyun »

hi.
if visualID is zero, when zero value is returned ?
if zero, what's the problem ? I want the visualID is 1.
where can I see eglGetConfigAttrib function ?


EGLint attribs[] =
{
EGL_RED_SIZE, 5,
EGL_GREEN_SIZE, 5,
EGL_BLUE_SIZE, 5,
EGL_ALPHA_SIZE, params.WithAlphaChannel ? 1 : 0,
EGL_BUFFER_SIZE, params.Bits,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
//EGL_COLOR_BUFFER_TYPE, EGL_RGB_BUFFER,
EGL_DEPTH_SIZE, params.ZBufferBits,
EGL_STENCIL_SIZE, params.Stencilbuffer,
EGL_SAMPLE_BUFFERS, params.AntiAlias ? 1 : 0,
EGL_SAMPLES, params.AntiAlias,
#ifdef EGL_VERSION_1_3
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
#endif
EGL_NONE, 0
};

EGLint contextAttrib[] =
{
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE, 0
};

EGLConfig config;
EGLint num_configs;
if(!eglChooseConfig(EglDisplay, attribs, &config, 1, &num_configs) || num_configs != 1)
{
os::Printer::log("Could not get config for OpenGL-ES2 display.");
return;
}
else
{
os::Printer::log("Got config for OpenGL-ES2 display.");
}
eglBindAPI(EGL_OPENGL_ES_API);
EGLint visualID;
eglGetConfigAttrib(EglDisplay, config, EGL_NATIVE_VISUAL_ID, &visualID);
Post Reply