diff options
-rw-r--r-- | chart2/source/view/main/GL3DRenderer.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index 7725cbfe6464..339cc7ecdb3c 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -1131,8 +1131,7 @@ void OpenGL3DRenderer::RenderExtrudeFlatSurface(const Extrude3DInfo& extrude3D, glm::mat3 normalInverseTranspos = glm::inverseTranspose(normalMatrix); glUniformMatrix4fv(m_3DModelID, 1, GL_FALSE, &m_Model[0][0]); glUniformMatrix3fv(m_3DNormalMatrixID, 1, GL_FALSE, &normalInverseTranspos[0][0]); - //TODO: moggi: startIndex is int!!!! - glDrawElements(GL_TRIANGLES, extrude3D.size[surIndex], GL_UNSIGNED_SHORT, &extrude3D.startIndex[surIndex]); + glDrawElements(GL_TRIANGLES, extrude3D.size[surIndex], GL_UNSIGNED_SHORT, reinterpret_cast<GLvoid*>(extrude3D.startIndex[surIndex])); } void OpenGL3DRenderer::RenderExtrudeBottomSurface(const Extrude3DInfo& extrude3D) @@ -1165,8 +1164,7 @@ void OpenGL3DRenderer::RenderExtrudeBottomSurface(const Extrude3DInfo& extrude3D glm::mat3 normalInverseTranspos = glm::inverseTranspose(normalMatrix); glUniformMatrix4fv(m_3DModelID, 1, GL_FALSE, &m_Model[0][0]); glUniformMatrix3fv(m_3DNormalMatrixID, 1, GL_FALSE, &normalInverseTranspos[0][0]); - //TODO: moggi: startIndex is int!!!! - glDrawElements(GL_TRIANGLES, extrude3D.size[BOTTOM_SURFACE], GL_UNSIGNED_SHORT, &extrude3D.startIndex[BOTTOM_SURFACE]); + glDrawElements(GL_TRIANGLES, extrude3D.size[BOTTOM_SURFACE], GL_UNSIGNED_SHORT, reinterpret_cast<GLvoid*>(extrude3D.startIndex[BOTTOM_SURFACE])); } void OpenGL3DRenderer::RenderExtrudeMiddleSurface(const Extrude3DInfo& extrude3D) @@ -1201,7 +1199,7 @@ void OpenGL3DRenderer::RenderExtrudeMiddleSurface(const Extrude3DInfo& extrude3D glm::mat3 normalInverseTranspos = glm::inverseTranspose(normalMatrix); glUniformMatrix4fv(m_3DModelID, 1, GL_FALSE, &m_Model[0][0]); glUniformMatrix3fv(m_3DNormalMatrixID, 1, GL_FALSE, &normalInverseTranspos[0][0]); - glDrawElements(GL_TRIANGLES, extrude3D.size[MIDDLE_SURFACE], GL_UNSIGNED_SHORT, &extrude3D.startIndex[MIDDLE_SURFACE]); + glDrawElements(GL_TRIANGLES, extrude3D.size[MIDDLE_SURFACE], GL_UNSIGNED_SHORT, reinterpret_cast<GLvoid*>(extrude3D.startIndex[MIDDLE_SURFACE])); } void OpenGL3DRenderer::RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D) @@ -1237,7 +1235,7 @@ void OpenGL3DRenderer::RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D) glm::mat3 normalInverseTranspos = glm::inverseTranspose(normalMatrix); glUniformMatrix4fv(m_3DModelID, 1, GL_FALSE, &m_Model[0][0]); glUniformMatrix3fv(m_3DNormalMatrixID, 1, GL_FALSE, &normalInverseTranspos[0][0]); - glDrawElements(GL_TRIANGLES, extrude3D.size[TOP_SURFACE], GL_UNSIGNED_SHORT, &extrude3D.startIndex[TOP_SURFACE]); + glDrawElements(GL_TRIANGLES, extrude3D.size[TOP_SURFACE], GL_UNSIGNED_SHORT, reinterpret_cast<GLvoid*>(extrude3D.startIndex[TOP_SURFACE])); RenderExtrudeFlatSurface(extrude3D, FLAT_BOTTOM_SURFACE); } |