- fixed headless server (dont call glew)

This commit is contained in:
Mark Vejvoda
2011-11-18 15:07:28 +00:00
parent 0787c09d9b
commit 93f0813033

View File

@@ -162,13 +162,14 @@ void PlatformContextGl::init(int colorBits, int depthBits, int stencilBits,bool
SDL_WM_GrabInput(SDL_GRAB_OFF); SDL_WM_GrabInput(SDL_GRAB_OFF);
} }
if(Window::getMasterserverMode() == false) {
GLuint err = glewInit(); GLuint err = glewInit();
if (GLEW_OK != err) { if (GLEW_OK != err) {
fprintf(stderr, "Error [main]: glewInit failed: %s\n", glewGetErrorString(err)); fprintf(stderr, "Error [main]: glewInit failed: %s\n", glewGetErrorString(err));
//return 1; //return 1;
throw std::runtime_error((char *)glewGetErrorString(err)); throw std::runtime_error((char *)glewGetErrorString(err));
} }
}
} }
void PlatformContextGl::end() { void PlatformContextGl::end() {