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:
authorPorteries Tristan <republicthunderbolt9@gmail.com>2015-06-20 15:21:31 +0300
committerPorteries Tristan <republicthunderbolt9@gmail.com>2015-06-20 15:21:31 +0300
commit2a305580b2c76af62c129fbca043466ab010c2df (patch)
treeca2713a78353dc5e0f41915621ef000c2c470b88 /source/gameengine/Rasterizer/RAS_MeshObject.cpp
parent6b3a43ccb4c3d9cc385d1f2acaac2d4d39ce25df (diff)
BGE: Fix T38030: wrong vertex index returned by KX_PolyProxy
Fix T38030. In c++ source we use one list for triangles and an other for quads, but KX_PolyProxy doesn't care about that and return the vertex offset in its list. So we just have to compute the offset of each RAS_DisplayArray to its previous to have an absolute vertex index. Reviewers: moguri, campbellbarton, kupoman, agoose77, brita_, hg1 Reviewed By: agoose77, hg1 Projects: #game_engine Maniphest Tasks: T38030 Differential Revision: https://developer.blender.org/D1324
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MeshObject.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_MeshObject.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp
index 54b15f07896..4360464ed32 100644
--- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp
+++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp
@@ -465,6 +465,23 @@ void RAS_MeshObject::RemoveFromBuckets(void *clientobj)
}
}
+void RAS_MeshObject::EndConversion()
+{
+#if 0
+ m_sharedvertex_map.clear(); // SharedVertex
+ vector<vector<SharedVertex> > shared_null(0);
+ shared_null.swap( m_sharedvertex_map ); /* really free the memory */
+#endif
+
+ for (std::list<RAS_MeshMaterial>::iterator it = m_materials.begin();
+ it != m_materials.end();
+ ++it)
+ {
+ RAS_MeshSlot *ms = it->m_baseslot;
+ ms->UpdateDisplayArraysOffset();
+ }
+}
+
//void RAS_MeshObject::Transform(const MT_Transform& trans)
//{
//m_trans.translate(MT_Vector3(0,0,1));//.operator *=(trans);