Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2006-02-13 08:45:32 +0300
committerErwin Coumans <blender@erwincoumans.com>2006-02-13 08:45:32 +0300
commite4790aef46f7ca0b4ab01c34f043be9e7b1fa7f1 (patch)
tree0d83145e454cc7b5947ec657dbd9e415aac9d809 /source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
parent6c325d74f534d259820c2b2d94d5b73b3acf0a35 (diff)
Improved OpenGL Shader Language support for game engine. The python interface is much simplified. Drawback is that scripts need to be updated next release. Testfiles:
http://www.continuousphysics.com/ftp/pub/test/index.php?dir=blender/&file=demos-2.42.zip patch by Charlie Carley (snailrose @ elysiun.com)
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
index b1d32326048..3aded0568cb 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
@@ -135,8 +135,6 @@ void RAS_MaterialBucket::MarkVisibleMeshSlot(KX_MeshSlot& ms,
(*it).m_RGBAcolor= rgbavec;
}
-
-
bool RAS_MaterialBucket::IsTransparant() const
{
return (m_material->IsTransparant());
@@ -180,10 +178,11 @@ bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_I
bool dolights = false;
const unsigned int flag = m_material->GetFlag();
+
if( flag & RAS_BLENDERMAT)
- dolights = flag &RAS_MULTILIGHT;
+ dolights = (flag &RAS_MULTILIGHT)!=0;
else
- dolights = m_material->GetDrawingMode()&16;
+ dolights = (m_material->GetDrawingMode()&16)!=0;
if ((rasty->GetDrawingMode() <= RAS_IRasterizer::KX_SOLID) || !dolights)
{
@@ -206,6 +205,7 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa
if (!ms.m_bVisible)
return;
+ m_material->ActivateMeshSlot(ms, rasty);
rendertools->SetClientObject(ms.m_clientObj);
/* __NLA Do the deformation */
@@ -311,7 +311,6 @@ void RAS_MaterialBucket::Render(const MT_Transform& cameratrans,
}
int drawmode;
-
for (T_MeshSlotList::const_iterator it = m_meshSlots.begin();
! (it == m_meshSlots.end()); ++it)
{