summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-05-08 06:00:48 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-08 06:01:14 +0200
commitcabd5e4b2ac9ed857845984c6617a556f950ff70 (patch)
treebff2ba441cad0dbdfb5823d88967529a911eef1e /chart2
parent2ca8dbba58a44d4b65cbe78508d7ad0ef76cffa0 (diff)
correct casts
Change-Id: Ib74e924663c91be09d96e9e25e011e578656a6a0
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/main/GL3DRenderer.cxx10
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);
}