From 452ad50fe2748c473df2c84f64a39de33c815bb9 Mon Sep 17 00:00:00 2001 From: Porteries Tristan Date: Sat, 6 Feb 2016 14:15:37 +0100 Subject: [PATCH] UPBGE: Remove glsl option in KX_LightObject and RAS_ILightObject. --- .../Converter/BL_BlenderDataConversion.cpp | 15 ++------------- source/gameengine/Ketsji/KX_Light.cpp | 4 +--- source/gameengine/Ketsji/KX_Light.h | 2 +- source/gameengine/Rasterizer/RAS_ILightObject.h | 1 - .../RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp | 5 +---- 5 files changed, 5 insertions(+), 22 deletions(-) diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index f4f9a335a946..684fb4e5b605 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -1348,16 +1348,6 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l bool glslmat = true; - // in GLSL NEGATIVE LAMP is handled inside the lamp update function - if (glslmat==0) { - if (la->mode & LA_NEG) - { - lightobj->m_color[0] = -lightobj->m_color[0]; - lightobj->m_color[1] = -lightobj->m_color[1]; - lightobj->m_color[2] = -lightobj->m_color[2]; - } - } - if (la->type==LA_SUN) { lightobj->m_type = RAS_ILightObject::LIGHT_SUN; } else if (la->type==LA_SPOT) { @@ -1366,9 +1356,8 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l lightobj->m_type = RAS_ILightObject::LIGHT_NORMAL; } - gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rasterizer, - lightobj, glslmat); - + gamelight = new KX_LightObject(kxscene, KX_Scene::m_callbacks, rasterizer, lightobj); + return gamelight; } diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index d3766bffd79d..07e0c0dd3a92 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -54,8 +54,7 @@ KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks, RAS_IRasterizer* rasterizer, - RAS_ILightObject* lightobj, - bool glsl) + RAS_ILightObject* lightobj) : KX_GameObject(sgReplicationInfo,callbacks), m_rasterizer(rasterizer) { @@ -63,7 +62,6 @@ KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks, m_lightobj->m_scene = sgReplicationInfo; m_lightobj->m_light = this; m_rasterizer->AddLight(m_lightobj); - m_lightobj->m_glsl = glsl; m_blenderscene = ((KX_Scene*)sgReplicationInfo)->GetBlenderScene(); m_base = NULL; }; diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h index 0a8c6e5359e6..0f2a6ff2f593 100644 --- a/source/gameengine/Ketsji/KX_Light.h +++ b/source/gameengine/Ketsji/KX_Light.h @@ -54,7 +54,7 @@ class KX_LightObject : public KX_GameObject Base* m_base; public: - KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,RAS_IRasterizer* rasterizer,RAS_ILightObject* lightobj, bool glsl); + KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,RAS_IRasterizer* rasterizer,RAS_ILightObject* lightobj); virtual ~KX_LightObject(); virtual CValue* GetReplica(); RAS_ILightObject* GetLightData() { return m_lightobj;} diff --git a/source/gameengine/Rasterizer/RAS_ILightObject.h b/source/gameengine/Rasterizer/RAS_ILightObject.h index 3da8d9abd490..afa6d86d71c5 100644 --- a/source/gameengine/Rasterizer/RAS_ILightObject.h +++ b/source/gameengine/Rasterizer/RAS_ILightObject.h @@ -76,7 +76,6 @@ class RAS_ILightObject bool m_nodiffuse; bool m_nospecular; - bool m_glsl; bool m_staticShadow; bool m_requestShadowUpdate; diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp index 02d79dde153a..5ab535d85e5c 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp @@ -159,10 +159,7 @@ GPULamp *RAS_OpenGLLight::GetGPULamp() { KX_LightObject *kxlight = (KX_LightObject *)m_light; - if (m_glsl) - return GPU_lamp_from_blender(kxlight->GetScene()->GetBlenderScene(), kxlight->GetBlenderObject(), kxlight->GetBlenderGroupObject()); - else - return NULL; + return GPU_lamp_from_blender(kxlight->GetScene()->GetBlenderScene(), kxlight->GetBlenderObject(), kxlight->GetBlenderGroupObject()); } bool RAS_OpenGLLight::HasShadowBuffer()