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:
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.h')
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.h b/source/gameengine/Rasterizer/RAS_MaterialBucket.h
index 007fdf240c4..1eee99f896b 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.h
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.h
@@ -80,6 +80,13 @@ public:
class RAS_DisplayArray
{
public:
+ /** The offset relation to the previous RAS_DisplayArray.
+ * For the user vertex are one big list but in C++ source
+ * it's two different lists if we use quads and triangles.
+ * So to fix that we add an offset.
+ * This value is set in UpdateDisplayArraysOffset().
+ */
+ unsigned int m_offset;
vector<RAS_TexVert> m_vertex;
vector<unsigned short> m_index;
/* LINE currently isn't used */
@@ -165,6 +172,9 @@ public:
int AddVertex(const RAS_TexVert& tv);
void AddPolygonVertex(int offset);
+ /// Update offset of each display array
+ void UpdateDisplayArraysOffset();
+
/* optimization */
bool Split(bool force=false);
bool Join(RAS_MeshSlot *target, MT_Scalar distance);