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_Polygon.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_Polygon.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_Polygon.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Rasterizer/RAS_Polygon.cpp b/source/gameengine/Rasterizer/RAS_Polygon.cpp
index 1f23df90753..3274ded4406 100644
--- a/source/gameengine/Rasterizer/RAS_Polygon.cpp
+++ b/source/gameengine/Rasterizer/RAS_Polygon.cpp
@@ -62,9 +62,9 @@ RAS_TexVert *RAS_Polygon::GetVertex(int i)
return &m_darray->m_vertex[m_offset[i]];
}
-int RAS_Polygon::GetVertexOffset(int i)
+unsigned int RAS_Polygon::GetVertexOffsetAbsolute(unsigned short i)
{
- return m_offset[i];
+ return m_offset[i] + m_darray->m_offset;
}
/*