diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2014-01-27 07:28:26 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2014-03-20 10:57:49 +0400 |
commit | e02b9c8a45266993e5cefb71d55234128aca208c (patch) | |
tree | d9d29a0b6a0ee81b879c9665ce74f6370829257e /source/gameengine/Ketsji | |
parent | 9d4b54b44fccabffeebd45c86f8e344e67327ad3 (diff) |
BGE: Adding support for the Cast Only material option.
Note: This does not add support for the option in the viewport.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/BL_Material.h | 3 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_BlenderMaterial.cpp | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h index be66e2ec84d..83f9b601e0d 100644 --- a/source/gameengine/Ketsji/BL_Material.h +++ b/source/gameengine/Ketsji/BL_Material.h @@ -144,7 +144,8 @@ enum BL_ras_mode WIRE=64, CAST_SHADOW=128, TEX=256, - TWOSIDED=512 + TWOSIDED=512, + ONLY_SHADOW=1024, }; // ------------------------------------- diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index efaaed7b567..68a71218b8c 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -110,6 +110,7 @@ void KX_BlenderMaterial::Initialize( m_flag |= ((mMaterial->ras_mode & USE_LIGHT)!=0)? RAS_MULTILIGHT: 0; m_flag |= (mMaterial->glslmat)? RAS_BLENDERGLSL: 0; m_flag |= ((mMaterial->ras_mode & CAST_SHADOW)!=0)? RAS_CASTSHADOW: 0; + m_flag |= ((mMaterial->ras_mode & ONLY_SHADOW)!=0)? RAS_ONLYSHADOW: 0; // test the sum of the various modes for equality // so we can ether accept or reject this material |