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-04-03 01:04:20 +0400
committerErwin Coumans <blender@erwincoumans.com>2006-04-03 01:04:20 +0400
commit6839ec66405f366d95641b1d5685369a1b19757c (patch)
treeecd65680f673221994758ab86dd563cf9462d8df /source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
parent756bad72c4ca4538834aed7bbdc46a2cce41393f (diff)
applied Charlies patch for game engine graphics. display list support, and bumpmapping shader improvements.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
index 3aded0568cb..ef89477c345 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
@@ -61,9 +61,6 @@ void KX_VertexIndex::SetIndex(short loc,unsigned int index)
m_indexarray[loc]=index;
}
-
-
-
bool KX_MeshSlot::Less(const KX_MeshSlot& lhs) const
{
bool result = ((m_mesh < lhs.m_mesh ) ||
@@ -205,8 +202,8 @@ 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);
+ m_material->ActivateMeshSlot(ms, rasty);
/* __NLA Do the deformation */
if (ms.m_pDeformer)
@@ -222,6 +219,12 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa
rendertools->PushMatrix();
rendertools->applyTransform(rasty,ms.m_OpenGLMatrix,m_material->GetDrawingMode());
+ if(rasty->QueryLists())
+ {
+ if(ms.m_DisplayList)
+ ms.m_DisplayList->SetModified(ms.m_mesh->MeshModified());
+ }
+
// Use the text-specific IndexPrimitives for text faces
if (m_material->GetDrawingMode() & RAS_IRasterizer::RAS_RENDER_3DPOLYGON_TEXT)
{
@@ -246,14 +249,15 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa
m_material,
rendertools,
ms.m_bObjectColor,
- ms.m_RGBAcolor
+ ms.m_RGBAcolor,
+ &ms.m_DisplayList
);
}
// for using glMultiTexCoord on deformer
else if(m_material->GetFlag() & RAS_DEFMULTI )
{
- rasty->IndexPrimitivesMulti(
+ rasty->IndexPrimitivesMulti_Ex(
ms.m_mesh->GetVertexCache(m_material),
ms.m_mesh->GetIndexCache(m_material),
drawmode,
@@ -287,10 +291,16 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa
m_material,
rendertools, // needed for textprinting on polys
ms.m_bObjectColor,
- ms.m_RGBAcolor
+ ms.m_RGBAcolor,
+ &ms.m_DisplayList
);
}
-
+
+ if(rasty->QueryLists()) {
+ if(ms.m_DisplayList)
+ ms.m_mesh->SetMeshModified(false);
+ }
+
rendertools->PopMatrix();
}