From 7fc26e0123e700113f340068a964c1a12133b7e1 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Wed, 24 Aug 2011 20:28:54 +0000 Subject: 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." --- source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp') 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); -- cgit v1.2.3