diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-09-10 13:51:06 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-09-10 13:51:06 +0400 |
commit | 75078d62df5ee8186369b5f1273b61b0736346ec (patch) | |
tree | 42b4103b9bb22482b55dd004a09a4ef09946a7f8 /source/gameengine/Ketsji/KX_Light.cpp | |
parent | ecc5bdb8d72aca5199de6a69b4b6c493f0191d51 (diff) |
Fix for bug #17589: removing a lamp in the game engine with glsl
materials did not work correct.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Light.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_Light.cpp | 7 |
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); } |