X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameDraw.cpp;h=16d845a53b35d1ee0126818af9a8123ee56c81ae;hb=b647e4eb105d00bdbf2c8e39b5ae3cf7700c08aa;hp=b321e7ec0c450e392c24bdd6510bd914eb697348;hpb=c26c5303fbc3fcc607681b848bc4fd0641320691;p=lugaru.git diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index b321e7e..16d845a 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -189,7 +189,7 @@ long long Game::MD5_string (char *string){ //return 1111111111111111; } -int Game::DrawGLScene(GLvoid) +int Game::DrawGLScene(void) { static float texcoordwidth,texcoordheight; static float texviewwidth, texviewheight; @@ -1939,7 +1939,7 @@ int Game::DrawGLScene(GLvoid) if(drawmode!=normalmode){ glEnable(GL_TEXTURE_2D); - //glFinish(); + glFinish(); if(!drawtoggle||drawmode!=realmotionblurmode||(drawtoggle==2||change==1)){ if(screentexture){ @@ -2218,6 +2218,10 @@ int Game::DrawGLScene(GLvoid) } if(mainmenu){ +#if USE_SDL + // !!! FIXME: hack: clamp framerate in menu so text input works correctly on fast systems. + SDL_Delay(15); +#endif glDrawBuffer(GL_BACK); glReadBuffer(GL_BACK); glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); @@ -3940,8 +3944,14 @@ int Game::DrawGLScene(GLvoid) //glFlush(); if(drawmode!=motionblurmode||mainmenu){ + #if !USE_SDL + // this prevents menus from rendering if you hit ESC during + // motion blur sequences...maybe SDL is buffering differently? if(drawmode!=motionblurmode) swap_gl_buffers(); + #else + swap_gl_buffers(); + #endif } //myassert(glGetError() == GL_NO_ERROR);