zerogsogl: glew initialized too early (thanks to BirdFuzz)

This commit is contained in:
zerofrog
2007-11-15 01:55:28 +00:00
parent 354799fa63
commit fd721667c5

View File

@@ -1224,7 +1224,15 @@ bool ZeroGS::Create(int _width, int _height)
}
s_nFullscreen = (conf.options & GSOPTION_FULLSCREEN) ? 1 : 0;
conf.mrtdepth = 0; // for now
conf.mrtdepth = 0; // for now
#ifndef _WIN32
int const glew_ok = glewInit();
if( glew_ok != GLEW_OK ) {
ERROR_LOG("glewInit() is not ok!\n");
return false;
}
#endif
if( !IsGLExt("GL_EXT_framebuffer_object") ) {
ERROR_LOG("*********\nZeroGS: ERROR: Need GL_EXT_framebufer_object for multiple render targets\nZeroGS: *********\n");
@@ -1383,14 +1391,6 @@ bool ZeroGS::Create(int _width, int _height)
GL_LOADFN(glGetFramebufferAttachmentParameterivEXT);
GL_LOADFN(glGenerateMipmapEXT);
#ifndef _WIN32
int const glew_ok = glewInit();
if( glew_ok != GLEW_OK ) {
ERROR_LOG("glewInit() is not ok!\n");
return false;
}
#endif
if( IsGLExt("GL_ARB_draw_buffers") )
glDrawBuffers = (PFNGLDRAWBUFFERSPROC)wglGetProcAddress("glDrawBuffers");
else if( IsGLExt("GL_ATI_draw_buffers") )