From 74145447743c425350f25f75d2681aef0d305336 Mon Sep 17 00:00:00 2001 From: lindaandersson Date: Thu, 20 Feb 2014 08:43:54 +0100 Subject: [PATCH] GameClient exclude RB rendering from release --- .../GameClient/GameClientState/GameState.cpp | 84 ++++++++++--------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/Code/Game/GameClient/GameClientState/GameState.cpp b/Code/Game/GameClient/GameClientState/GameState.cpp index 7d04edda..92ab341d 100644 --- a/Code/Game/GameClient/GameClientState/GameState.cpp +++ b/Code/Game/GameClient/GameClientState/GameState.cpp @@ -189,47 +189,49 @@ bool GameState::Render() light->second->Render(); }*/ - // RB DEBUG render wire frame - //if(this->privData->renderWhireframe) - //{ - // Oyster::Graphics::API::StartRenderWireFrame(); - // - // Oyster::Math3D::Float4x4 translation = Oyster::Math3D::TranslationMatrix(Float3( 0,132, 20)); - // Oyster::Math3D::Float4x4 scale = Oyster::Math3D::ScalingMatrix(Float3( 0.5f, 0.5f, 0.5f)); - // Oyster::Math3D::Float4x4 world = translation * scale; - // Oyster::Graphics::API::RenderDebugCube( world ); - // Oyster::Graphics::API::RenderDebugCube(this->privData->player.getRBWorld()); - // - // staticObject = this->privData->staticObjects->begin(); - // for( ; staticObject != this->privData->staticObjects->end(); ++staticObject ) - // { - // if( staticObject->second->getBRtype() == RB_Type_Cube) - // { - // Oyster::Graphics::API::RenderDebugCube( staticObject->second->getRBWorld()); - // } - // if( staticObject->second->getBRtype() == RB_Type_Sphere) - // { - // Oyster::Graphics::API::RenderDebugSphere( staticObject->second->getRBWorld()); - // } - // } - // - // dynamicObject = this->privData->dynamicObjects->begin(); - // for( ; dynamicObject != this->privData->dynamicObjects->end(); ++dynamicObject ) - // { - // if( dynamicObject->second ) - // { - // if( dynamicObject->second->getBRtype() == RB_Type_Cube) - // { - // Oyster::Graphics::API::RenderDebugCube( dynamicObject->second->getRBWorld()); - // } - // if( dynamicObject->second->getBRtype() == RB_Type_Sphere) - // { - // Oyster::Graphics::API::RenderDebugSphere( dynamicObject->second->getRBWorld()); - // } - // } - // } - //} - // !RB DEBUG +#ifdef _DEBUG + //RB DEBUG render wire frame + if(this->privData->renderWhireframe) + { + Oyster::Graphics::API::StartRenderWireFrame(); + + Oyster::Math3D::Float4x4 translation = Oyster::Math3D::TranslationMatrix(Float3( 0,132, 20)); + Oyster::Math3D::Float4x4 scale = Oyster::Math3D::ScalingMatrix(Float3( 0.5f, 0.5f, 0.5f)); + Oyster::Math3D::Float4x4 world = translation * scale; + Oyster::Graphics::API::RenderDebugCube( world ); + Oyster::Graphics::API::RenderDebugCube(this->privData->player.getRBWorld()); + + staticObject = this->privData->staticObjects->begin(); + for( ; staticObject != this->privData->staticObjects->end(); ++staticObject ) + { + if( staticObject->second->getBRtype() == RB_Type_Cube) + { + Oyster::Graphics::API::RenderDebugCube( staticObject->second->getRBWorld()); + } + if( staticObject->second->getBRtype() == RB_Type_Sphere) + { + Oyster::Graphics::API::RenderDebugSphere( staticObject->second->getRBWorld()); + } + } + + dynamicObject = this->privData->dynamicObjects->begin(); + for( ; dynamicObject != this->privData->dynamicObjects->end(); ++dynamicObject ) + { + if( dynamicObject->second ) + { + if( dynamicObject->second->getBRtype() == RB_Type_Cube) + { + Oyster::Graphics::API::RenderDebugCube( dynamicObject->second->getRBWorld()); + } + if( dynamicObject->second->getBRtype() == RB_Type_Sphere) + { + Oyster::Graphics::API::RenderDebugSphere( dynamicObject->second->getRBWorld()); + } + } + } + } + //!RB DEBUG +#endif Oyster::Graphics::API::EndFrame(); return true;