From f91e2abc6b61650b45932920e9b15b04b3e3a413 Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 6 Jan 2012 12:37:23 +0100 Subject: [PATCH 1/3] updated copyright to 2012 and fixed a typo in the license --- license.txt | 4 ++-- readme.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/license.txt b/license.txt index a59a9f13b..24b0564f7 100644 --- a/license.txt +++ b/license.txt @@ -1,4 +1,4 @@ -Copyright (C) 2007-2011 Magnus Auvinen +Copyright (C) 2007-2012 Magnus Auvinen This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -25,4 +25,4 @@ check the individual libraries. ------------------------------------------------------------------------ With that being said, contact us if there is anything you want to do -that the license does not premit. +that the license does not permit. diff --git a/readme.txt b/readme.txt index bc8e69694..6469b4923 100644 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ -Copyright (c) 2011 Magnus Auvinen +Copyright (c) 2012 Magnus Auvinen This software is provided 'as-is', without any express or implied From 12f76e7f8d935443bd4590af4ff12f95a3d4a94b Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 6 Jan 2012 12:55:19 +0100 Subject: [PATCH 2/3] made the editor work again. Closes #914 --- src/engine/client/client.cpp | 41 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 5d757c495..35381fdf5 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -1757,7 +1757,7 @@ void CClient::Run() MasterServer()->RefreshAddresses(m_NetClient.NetType()); // init the editor - //m_pEditor->Init(); + m_pEditor->Init(); // load data @@ -1859,22 +1859,16 @@ void CClient::Run() */ // render - if(g_Config.m_ClEditor) { - if(!m_EditorActive) + if(g_Config.m_ClEditor) { - GameClient()->OnActivateEditor(); - m_EditorActive = true; + if(!m_EditorActive) + { + GameClient()->OnActivateEditor(); + m_EditorActive = true; + } } - - Update(); - m_pEditor->UpdateAndRender(); - DebugRender(); - m_pGraphics->Swap(); - } - else - { - if(m_EditorActive) + else if(m_EditorActive) m_EditorActive = false; Update(); @@ -1898,18 +1892,27 @@ void CClient::Run() { if((m_RenderFrames%10) == 0) { - Render(); + if(!m_EditorActive) + Render(); + else + { + m_pEditor->UpdateAndRender(); + DebugRender(); + } m_pGraphics->Swap(); } } else { - Render(); + if(!m_EditorActive) + Render(); + else + { + m_pEditor->UpdateAndRender(); + DebugRender(); + } m_pGraphics->Swap(); } - - - } } From 71dd0c5aab9b4f2dd50b3e935db764a3868de83e Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 6 Jan 2012 14:12:49 +0100 Subject: [PATCH 3/3] 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