diff options
Diffstat (limited to 'source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp')
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp index 43166c0698a..9156102ab0d 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp @@ -92,23 +92,23 @@ void KX_BlenderRenderTools::ProcessLighting(RAS_IRasterizer *rasty, bool useligh int layer= -1; /* find the layer */ - if(uselights) { - if(m_clientobject) + if (uselights) { + if (m_clientobject) layer = static_cast<KX_GameObject*>(m_clientobject)->GetLayer(); } /* avoid state switching */ - if(m_lastlightlayer == layer && m_lastauxinfo == m_auxilaryClientInfo) + if (m_lastlightlayer == layer && m_lastauxinfo == m_auxilaryClientInfo) return; m_lastlightlayer = layer; m_lastauxinfo = m_auxilaryClientInfo; /* enable/disable lights as needed */ - if(layer >= 0) + if (layer >= 0) enable = applyLights(layer, viewmat); - if(enable) + if (enable) EnableOpenGLLights(rasty); else DisableOpenGLLights(); @@ -116,7 +116,7 @@ void KX_BlenderRenderTools::ProcessLighting(RAS_IRasterizer *rasty, bool useligh void KX_BlenderRenderTools::EnableOpenGLLights(RAS_IRasterizer *rasty) { - if(m_lastlighting == true) + if (m_lastlighting == true) return; glEnable(GL_LIGHTING); @@ -133,7 +133,7 @@ void KX_BlenderRenderTools::EnableOpenGLLights(RAS_IRasterizer *rasty) void KX_BlenderRenderTools::DisableOpenGLLights() { - if(m_lastlighting == false) + if (m_lastlighting == false) return; glDisable(GL_LIGHTING); @@ -297,7 +297,7 @@ void KX_BlenderRenderTools::RenderText2D(RAS_TEXT_RENDER_MODE mode, int width, int height) { - if(mode == RAS_IRenderTools::RAS_TEXT_PADDED) + if (mode == RAS_IRenderTools::RAS_TEXT_PADDED) BL_print_gamedebug_line_padded(text, xco, yco, width, height); else BL_print_gamedebug_line(text, xco, yco, width, height); @@ -317,7 +317,7 @@ void KX_BlenderRenderTools::RenderText( struct MTFace* tface = 0; unsigned int *col = 0; - if(flag & RAS_BLENDERMAT) { + if (flag & RAS_BLENDERMAT) { KX_BlenderMaterial *bl_mat = static_cast<KX_BlenderMaterial*>(polymat); tface = bl_mat->GetMTFace(); col = bl_mat->GetMCol(); @@ -350,7 +350,7 @@ int KX_BlenderRenderTools::applyLights(int objectlayer, const MT_Transform& view unsigned int count; std::vector<struct RAS_LightObject*>::iterator lit = m_lights.begin(); - for(count=0; count<m_numgllights; count++) + for (count=0; count<m_numgllights; count++) glDisable((GLenum)(GL_LIGHT0+count)); viewmat.getValue(glviewmat); @@ -362,7 +362,7 @@ int KX_BlenderRenderTools::applyLights(int objectlayer, const MT_Transform& view RAS_LightObject* lightdata = (*lit); KX_LightObject *kxlight = (KX_LightObject*)lightdata->m_light; - if(kxlight->ApplyLight(kxscene, objectlayer, count)) + if (kxlight->ApplyLight(kxscene, objectlayer, count)) count++; } glPopMatrix(); @@ -374,16 +374,16 @@ void KX_BlenderRenderTools::MotionBlur(RAS_IRasterizer* rasterizer) { int state = rasterizer->GetMotionBlurState(); float motionblurvalue; - if(state) + if (state) { motionblurvalue = rasterizer->GetMotionBlurValue(); - if(state==1) + if (state==1) { //bugfix:load color buffer into accum buffer for the first time(state=1) glAccum(GL_LOAD, 1.0); rasterizer->SetMotionBlurState(2); } - else if(motionblurvalue>=0.0 && motionblurvalue<=1.0) + else if (motionblurvalue>=0.0 && motionblurvalue<=1.0) { glAccum(GL_MULT, motionblurvalue); glAccum(GL_ACCUM, 1-motionblurvalue); |