Skip to content

Commit

Permalink
UPBGE: Remove glsl option in KX_LightObject and RAS_ILightObject.
Browse files Browse the repository at this point in the history
  • Loading branch information
panzergame committed Feb 17, 2016
1 parent 92b16d9 commit 452ad50
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 22 deletions.
15 changes: 2 additions & 13 deletions source/gameengine/Converter/BL_BlenderDataConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}

Expand Down
4 changes: 1 addition & 3 deletions source/gameengine/Ketsji/KX_Light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,14 @@

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)
{
m_lightobj = lightobj;
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;
};
Expand Down
2 changes: 1 addition & 1 deletion source/gameengine/Ketsji/KX_Light.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;}
Expand Down
1 change: 0 additions & 1 deletion source/gameengine/Rasterizer/RAS_ILightObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class RAS_ILightObject

bool m_nodiffuse;
bool m_nospecular;
bool m_glsl;

bool m_staticShadow;
bool m_requestShadowUpdate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 452ad50

Please sign in to comment.