diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-01-06 06:46:54 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-01-06 06:46:54 +0300 |
commit | 2e6d57618232b8b4ce8e5afe84fd278041cbbbfe (patch) | |
tree | c0f05e6b59aada420dd600f1138e9149b97d9e9d /source/gameengine/Rasterizer/RAS_MaterialBucket.cpp | |
parent | ef520a8cc9e863aa234be0ee60d1038e7ec8fc44 (diff) |
Sorry to break the cvs-closed status, so if you really need to make a new 2.40 build, just disable the game engine if it doesn't compile for a platform. Again, sorry if this breaks non-windows platforms, but I hope people help to get this amazing fix working for all platforms. Armature-fixing contribution from Snailrose. Also lots of cool things from Snailrose and Lagan.
Armatures are back
Split screen
Double sided lightning
Ambient lighting
Alpha test
Material IPO support (one per object atm)
Blender materials
GLSL shaders - Python access
Up to three texture samplers from the material panel ( 2D & Cube map )
Python access to a second set of uv coordinates
See http://www.elysiun.com/forum/viewtopic.php?t=58057
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.cpp')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_MaterialBucket.cpp | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp index 7f9f5b455ba..b1d32326048 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp @@ -177,7 +177,13 @@ bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_I if (!rasty->SetMaterial(*m_material)) return false; - bool dolights = m_material->GetDrawingMode()&16; + bool dolights = false; + const unsigned int flag = m_material->GetFlag(); + + if( flag & RAS_BLENDERMAT) + dolights = flag &RAS_MULTILIGHT; + else + dolights = m_material->GetDrawingMode()&16; if ((rasty->GetDrawingMode() <= RAS_IRasterizer::KX_SOLID) || !dolights) { @@ -229,6 +235,35 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa ms.m_RGBAcolor); } + + // for using glMultiTexCoord + else if(m_material->GetFlag() & RAS_MULTITEX ) + { + rasty->IndexPrimitivesMulti( + ms.m_mesh->GetVertexCache(m_material), + ms.m_mesh->GetIndexCache(m_material), + drawmode, + m_material, + rendertools, + ms.m_bObjectColor, + ms.m_RGBAcolor + ); + } + + // for using glMultiTexCoord on deformer + else if(m_material->GetFlag() & RAS_DEFMULTI ) + { + rasty->IndexPrimitivesMulti( + ms.m_mesh->GetVertexCache(m_material), + ms.m_mesh->GetIndexCache(m_material), + drawmode, + m_material, + rendertools, + ms.m_bObjectColor, + ms.m_RGBAcolor + ); + } + // Use the (slower) IndexPrimitives_Ex which can recalc face normals & such // for deformed objects - eventually should be extended to recalc ALL normals else if (ms.m_pDeformer){ |