From f608b3c44402ef5c58217481d93e7fa83c9cd7cf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 29 Jul 2012 17:49:14 +0000 Subject: code cleanup: - building without python works again - rename maxi/mini to i_max/i_min (so thay are available for function names) - some minor edits to IK stretch setting (no functional changes). --- source/gameengine/Ketsji/KX_Light.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source/gameengine/Ketsji/KX_Light.cpp') diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index 512dc4b931b..f5aa1bb3c75 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -29,11 +29,12 @@ * \ingroup ketsji */ - #if defined(WIN32) && !defined(FREE_WINDOWS) #pragma warning (disable : 4786) #endif +#include + #include "GL/glew.h" #include "KX_Light.h" @@ -148,11 +149,12 @@ bool KX_LightObject::ApplyLight(KX_Scene *kxscene, int oblayer, int slot) //vec[1]= -base->object->obmat[2][1]; //vec[2]= -base->object->obmat[2][2]; glLightfv((GLenum)(GL_LIGHT0+slot), GL_SPOT_DIRECTION, vec); - glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_CUTOFF, m_lightobj.m_spotsize/2.0); - glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_EXPONENT, 128.0*m_lightobj.m_spotblend); + glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_CUTOFF, m_lightobj.m_spotsize / 2.0f); + glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_EXPONENT, 128.0f * m_lightobj.m_spotblend); } - else + else { glLightf((GLenum)(GL_LIGHT0+slot), GL_SPOT_CUTOFF, 180.0); + } } if (m_lightobj.m_nodiffuse) { -- cgit v1.2.3