Skip to content

Commit ea1ffff

Browse files
committed
UPBGE: Fix batching uvs and colors.
The uvs and colors were merged at the wrong place (begining of the vector) before.
1 parent 5ac1856 commit ea1ffff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/gameengine/Rasterizer/RAS_BatchDisplayArray.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ unsigned int RAS_BatchDisplayArray::Merge(RAS_DisplayArray *array, const mt::mat
8686
}
8787

8888
for (unsigned short i = 0; i < m_format.uvSize; ++i) {
89-
m_vertexData.uvs[i].insert(m_vertexData.uvs[i].begin(), array->m_vertexData.uvs[i].begin(), array->m_vertexData.uvs[i].end());
89+
m_vertexData.uvs[i].insert(m_vertexData.uvs[i].end(), array->m_vertexData.uvs[i].begin(), array->m_vertexData.uvs[i].end());
9090
}
9191

9292
for (unsigned short i = 0; i < m_format.colorSize; ++i) {
93-
m_vertexData.colors[i].insert(m_vertexData.colors[i].begin(), array->m_vertexData.colors[i].begin(), array->m_vertexData.colors[i].end());
93+
m_vertexData.colors[i].insert(m_vertexData.colors[i].end(), array->m_vertexData.colors[i].begin(), array->m_vertexData.colors[i].end());
9494
}
9595

9696
// Copy the indices of the merged array with as gap the first vertex index.

0 commit comments

Comments
 (0)