Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-09-10 13:51:06 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-09-10 13:51:06 +0400
commit75078d62df5ee8186369b5f1273b61b0736346ec (patch)
tree42b4103b9bb22482b55dd004a09a4ef09946a7f8 /source/gameengine
parentecc5bdb8d72aca5199de6a69b4b6c493f0191d51 (diff)
Fix for bug #17589: removing a lamp in the game engine with glsl
materials did not work correct.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index 979015532e3..e0f171e78e0 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -65,6 +65,13 @@ KX_LightObject::KX_LightObject(void* sgReplicationInfo,SG_Callbacks callbacks,
KX_LightObject::~KX_LightObject()
{
+ GPULamp *lamp;
+
+ if((lamp = GetGPULamp())) {
+ float obmat[4][4] = {{0}};
+ GPU_lamp_update(lamp, 0, obmat);
+ }
+
m_rendertools->RemoveLight(&m_lightobj);
}