- removed glFinish call from OpenGLFrameBuffer::Update. This caused the CPU to wait for

all graphics to be rendered which isn't necessary. Instead we can let the GPU run in
  parallel to the next frame's setup and increase performance this way.


git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@585 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2009-10-30 11:13:29 +00:00
parent 7d507a4004
commit 93f3e279e1
2 changed files with 6 additions and 4 deletions

View file

@ -359,7 +359,8 @@ void FVertexBuffer::CheckPlanes(sector_t *sector)
//
// checks the validity of all planes attached to this sector
// and updates them if possible. Anything moving will not be
// updated unless it stops.
// updated unless it stops. This is to ensure that we never
// have to synchronize with the rendering process.
//
//==========================================================================

View file

@ -168,6 +168,7 @@ void OpenGLFrameBuffer::InitializeState()
// Updates the screen
//
//==========================================================================
CVAR(Bool, gl_draw_synchronized, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
void OpenGLFrameBuffer::Update()
{
@ -189,17 +190,17 @@ void OpenGLFrameBuffer::Update()
Begin2D(false);
}
Finish.Reset();
Finish.Clock();
gl.Finish();
Finish.Unclock();
if (gl_draw_synchronized) gl.Finish();
if (needsetgamma)
{
DoSetGamma();
needsetgamma = false;
}
gl.SwapBuffers();
Finish.Unclock();
Unlock();
}