diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-24 18:45:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-24 18:45:08 +0300 |
commit | ce8badeb187931cc24d29730d0d10a7242bb7969 (patch) | |
tree | 61791f61cb6d7de53aaceaa520a28cfe635292c7 /source/gameengine/Rasterizer/RAS_MaterialBucket.cpp | |
parent | dbe675195d8f78fb3a5f9b89d0c6b89a47513198 (diff) |
Fix for bug #18423: BGE lights in overlay scene also affected
other scenes, for texture face / multitexture materials.
Fix for bug #18428: BGE lights on hidden layers were still used,
for all material types, now they have no effect
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.cpp')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_MaterialBucket.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp index d8631c1edf6..20a8e9c3574 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp @@ -513,13 +513,13 @@ list<RAS_MeshSlot>::iterator RAS_MaterialBucket::msEnd() bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, RAS_IRenderTools *rendertools) { - if (!rasty->SetMaterial(*m_material)) + bool uselights; + + if(!rasty->SetMaterial(*m_material)) return false; - if (m_material->UsesLighting(rasty)) - rendertools->ProcessLighting(rasty, RAS_IRenderTools::RAS_LIGHT_OBJECT_LAYER, cameratrans); - else - rendertools->ProcessLighting(rasty, -1, cameratrans); + uselights= m_material->UsesLighting(rasty); + rendertools->ProcessLighting(rasty, uselights, cameratrans); return true; } |