MFC and OPENGL ES initial problem?

My code like follwing, compiling had no problem but can not excute on 2003 emulation.
Anyone know, how can I initial opengl es with MFC?
Thank you

EGLConfig configs[10];
EGLint matchingConfigs;

//configAttribs is a integers list that holds the desired format of
//our framebuffer. We will ask for a framebuffer with 24 bits of
//color and 16 bits of z-buffer. We also ask for a window buffer, not
//a pbuffer or pixmap buffer
const EGLint configAttribs[] =
{
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, EGL_DONT_CARE,
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, EGL_DONT_CARE,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_NONE, EGL_NONE
};

hDC = ::GetDC(m_hWnd);
glesDisplay = eglGetDisplay(hDC); //Ask for an available display

How to built a project with MFC in ECV4.0?

On windows mobile, the framebuffer is R5-G6-B5. Maybe that’s your problem?

  • HM

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.