forked from Mirrors/openclonk
Fix index buffer offset calculation (#1635)
This fixes rendering of some meshes with more than one submesh.objectmenu
parent
e6a153f5d5
commit
d3d3bb848e
|
@ -660,6 +660,7 @@ void StdMesh::UpdateIBO()
|
|||
{
|
||||
submesh.index_buffer_offset = offset * 3 * sizeof(GLuint);
|
||||
glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, submesh.index_buffer_offset, submesh.GetNumFaces() * 3 * sizeof(GLuint), &submesh.Faces[0]);
|
||||
offset += submesh.GetNumFaces();
|
||||
}
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue