Initialize the video mode before setting GL attributes

This commit is contained in:
hpsolo
2002-04-12 07:57:23 +00:00
parent 8c87fb51c0
commit 84ba288576

View File

@@ -58,7 +58,6 @@ int gl_start(int width, int height, int req_depth, int FullScreen)
flags |= (cvidmode == 16 ? SDL_RESIZABLE : 0);
flags |= (FullScreen ? SDL_FULLSCREEN : 0);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SurfaceX = width; SurfaceY = height;
surface = SDL_SetVideoMode(SurfaceX, SurfaceY, req_depth, flags);
@@ -69,6 +68,8 @@ int gl_start(int width, int height, int req_depth, int FullScreen)
return FALSE;
}
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
glvidbuffer = (unsigned short *) malloc(512 * 512 * sizeof(short));
gl_clearwin();
SDL_WarpMouse(SurfaceX / 4, SurfaceY / 4);