From 71dd0c5aab9b4f2dd50b3e935db764a3868de83e Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 6 Jan 2012 14:12:49 +0100 Subject: [PATCH] made gfx_finish work again --- src/engine/client/backend_sdl.cpp | 3 +++ src/engine/client/graphics_threaded.cpp | 1 + src/engine/client/graphics_threaded.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 691d193ca..3f74f87e0 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -290,6 +290,9 @@ void CCommandProcessorFragment_SDL::Cmd_Shutdown(const SCommand_Shutdown *pComma void CCommandProcessorFragment_SDL::Cmd_Swap(const CCommandBuffer::SCommand_Swap *pCommand) { GL_SwapBuffers(m_GLContext); + + if(pCommand->m_Finish) + glFinish(); } void CCommandProcessorFragment_SDL::Cmd_VideoModes(const CCommandBuffer::SCommand_VideoModes *pCommand) diff --git a/src/engine/client/graphics_threaded.cpp b/src/engine/client/graphics_threaded.cpp index 33670f7bd..c6947e332 100644 --- a/src/engine/client/graphics_threaded.cpp +++ b/src/engine/client/graphics_threaded.cpp @@ -837,6 +837,7 @@ void CGraphics_Threaded::Swap() // add swap command CCommandBuffer::SCommand_Swap Cmd; + Cmd.m_Finish = g_Config.m_GfxFinish; m_pCommandBuffer->AddCommand(Cmd); // kick the command buffer diff --git a/src/engine/client/graphics_threaded.h b/src/engine/client/graphics_threaded.h index 51148f0f2..f4f17ec26 100644 --- a/src/engine/client/graphics_threaded.h +++ b/src/engine/client/graphics_threaded.h @@ -199,6 +199,8 @@ public: struct SCommand_Swap : public SCommand { SCommand_Swap() : SCommand(CMD_SWAP) {} + + int m_Finish; }; struct SCommand_Texture_Create : public SCommand