Skip to content

Commit

Permalink
Added -glfinish for Linux/Unix.
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Aug 7, 2006
1 parent fd56d5f commit 8b746a8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doomsday/plugins/opengl/unix/src/main.c
Expand Up @@ -52,6 +52,7 @@ int verbose;
boolean wireframeMode;
boolean allowCompression;
boolean noArrays;
boolean forceFinishBeforeSwap = DGL_FALSE;

// PRIVATE DATA DEFINITIONS ------------------------------------------------

Expand Down Expand Up @@ -207,6 +208,11 @@ int DG_Init(int width, int height, int bpp, int mode)
useAnisotropic = DGL_TRUE;
Con_Message(" Using anisotropic texture filtering.\n");
}
if(ArgExists("-glfinish"))
{
forceFinishBeforeSwap = DGL_TRUE;
Con_Message(" glFinish() forced before swapping buffers.\n");
}
return DGL_OK;
}

Expand All @@ -223,6 +229,11 @@ void DG_Shutdown(void)
//===========================================================================
void DG_Show(void)
{
if(forceFinishBeforeSwap)
{
glFinish();
}

// Swap buffers.
SDL_GL_SwapBuffers();

Expand Down

0 comments on commit 8b746a8

Please sign in to comment.