From e4790aef46f7ca0b4ab01c34f043be9e7b1fa7f1 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Mon, 13 Feb 2006 05:45:32 +0000 Subject: 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) --- source/gameengine/Rasterizer/RAS_MaterialBucket.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.cpp') 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) { -- cgit v1.2.3