diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-07-10 16:47:20 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-07-10 16:47:20 +0400 |
commit | 99fdf27af92b9bd9d05c108f2c2c8a240c5536bc (patch) | |
tree | 0e7d2c4b425a5d3906a7841e5919e384e0bc27a4 /source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp | |
parent | 3d7358539df4526ffc2c2bbd40cf2001c5acf374 (diff) |
Sync with Apricot Game Engine
=============================
* Clean up and optimizations in skinned/deformed mesh code.
* Compatibility fixes and clean up in the rasterizer.
* Changes related to GLSL shadow buffers which should have no
effect, to keep the code in sync with apricot.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp index bff98abe058..cb10ba6bf37 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp @@ -27,6 +27,7 @@ */ #include "RAS_IPolygonMaterial.h" +#include "RAS_IRasterizer.h" #ifdef HAVE_CONFIG_H #include <config.h> @@ -148,4 +149,19 @@ const unsigned int RAS_IPolyMaterial::GetFlag() const return m_flag; } +bool RAS_IPolyMaterial::UsesLighting(RAS_IRasterizer *rasty) const +{ + bool dolights = false; + + if(m_flag & RAS_BLENDERMAT) + dolights = (m_flag &RAS_MULTILIGHT)!=0; + else if(rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID); + else if(rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW); + else + dolights = (m_drawingmode & 16)!=0; + + return dolights; +} + unsigned int RAS_IPolyMaterial::m_newpolymatid = 0; + |