diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-08-25 00:28:54 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-08-25 00:28:54 +0400 |
commit | 7fc26e0123e700113f340068a964c1a12133b7e1 (patch) | |
tree | 50a81047e60a7b8791181fb877915cee2a641ff2 /source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp | |
parent | 81a8f3e88592e6a570ab7e2f844c298a320480f5 (diff) |
Committing patch #25675 "Make "Cast Buffer Shadows" option work in viewport and BGE" by me.
Description from the tracker:
"It's really handy to be able to prevent an object/material from casting a shadow. So, I made use of the Cast Buffer Shadows option in the material settings, and made it work in the viewport and the BGE."
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp index 47f1dcb412a..5a1b52489b4 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp @@ -246,6 +246,11 @@ bool RAS_IPolyMaterial::UsesLighting(RAS_IRasterizer *rasty) const return dolights; } +bool RAS_IPolyMaterial::CastsShadows() const +{ + return (m_flag & RAS_CASTSHADOW) != 0; +} + bool RAS_IPolyMaterial::UsesObjectColor() const { return !(m_flag & RAS_BLENDERGLSL); |