HSurf = eglCreateWindowSurface(m_eglDsp, m_eglCfg, (EGLNativeWindowType) hWnd, WSAttrList) HANDLE hWnd = CreateHWnd2(400, 300, 'TestWnd') // CreateHWnd2 code below… even at this point any gl Command will violently assert/throw (including glGetError() because we don't hav a surface to draw into yet, and hence can't call eglMakeCurrent()
M_eglCxt = eglCreateContext( m_eglDsp, m_eglCfg, EGL_NO_CONTEXT, ctxAttribList ) Īssert( 0 & 'eglCreateContext failed' ) If ( !eglChooseConfig(m_eglDsp, CfgAttrList, &m_eglCfg, 1, &numConfigs) ) / Build up a nice standard attribute list (RGBA8888) If ( ! eglGetConfigs( m_eglDsp, NULL, 0, &numConfigs ) ) If ( ! eglInitialize( m_eglDsp, &majorVersion, &minorVersion) ) M_eglDsp = eglGetDisplay( EGL_DEFAULT_DISPLAY ) Gl Seems to come back to life after calling eglMakeCurrent(), but it's very iffy. This is particularly annoying since for the life of me I can't figure out why eglCreateContext() should touch gl until I actually Calling eglChooseConfig() a second time causes gl to start failing - it returns non-zero errors and even simple calls to glGenTextures() start functioning incorrectly.