summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorweigao <weigao@multicorewareinc.com>2014-08-02 13:11:28 +0800
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-08-06 20:45:11 +0200
commit7dcc31ed61bad3d3d649667f2fb890c878ac69c3 (patch)
tree696f2fdaca4b0697ab9d0bb8e4fa4b3eae8322c7 /chart2
parent00f097b627e7106dca2813371a524e260a4baddd (diff)
pick bar path should use the IDs in pick resource
Change-Id: Ifd20a7a9ecb85ffc080204f4f3e9f200b07b9a9c
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/main/GL3DRenderer.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 19a513e0a779..693a8f9f5b53 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -930,7 +930,7 @@ void OpenGL3DRenderer::RenderPolygon3D(const Polygon3DInfo& polygon)
{
glm::mat4 aMVP = m_3DProjection * m_3DView * m_Model;
glUniformMatrix4fv(maPickingResources.m_MatrixID, 1, GL_FALSE, &aMVP[0][0]);
- glUniform4fv(maResources.m_2DColorID, 1, &polygon.id[0]);
+ glUniform4fv(maPickingResources.m_2DColorID, 1, &polygon.id[0]);
}
GLint maVertexID = mbPickingMode ? maPickingResources.m_2DVertexID : maResources.m_3DVertexID;
// 1rst attribute buffer : vertices
@@ -1321,7 +1321,7 @@ void OpenGL3DRenderer::RenderExtrudeFlatSurface(const Extrude3DInfo& extrude3D,
{
glm::mat4 aMVP = m_3DProjection * m_3DView * m_Model;
glUniformMatrix4fv(maPickingResources.m_MatrixID, 1, GL_FALSE, &aMVP[0][0]);
- glUniform4fv(maResources.m_2DColorID, 1, &extrude3D.id[0]);
+ glUniform4fv(maPickingResources.m_2DColorID, 1, &extrude3D.id[0]);
}
glDrawElements(GL_TRIANGLES, extrude3D.size[surIndex], GL_UNSIGNED_SHORT, reinterpret_cast<GLvoid*>(extrude3D.startIndex[surIndex]));
@@ -1365,7 +1365,7 @@ void OpenGL3DRenderer::RenderExtrudeBottomSurface(const Extrude3DInfo& extrude3D
{
glm::mat4 aMVP = m_3DProjection * m_3DView * m_Model;
glUniformMatrix4fv(maPickingResources.m_MatrixID, 1, GL_FALSE, &aMVP[0][0]);
- glUniform4fv(maResources.m_2DColorID, 1, &extrude3D.id[0]);
+ glUniform4fv(maPickingResources.m_2DColorID, 1, &extrude3D.id[0]);
}
glDrawElements(GL_TRIANGLES, extrude3D.size[BOTTOM_SURFACE], GL_UNSIGNED_SHORT, reinterpret_cast<GLvoid*>(extrude3D.startIndex[BOTTOM_SURFACE]));
}
@@ -1410,7 +1410,7 @@ void OpenGL3DRenderer::RenderExtrudeMiddleSurface(const Extrude3DInfo& extrude3D
{
glm::mat4 aMVP = m_3DProjection * m_3DView * m_Model;
glUniformMatrix4fv(maPickingResources.m_MatrixID, 1, GL_FALSE, &aMVP[0][0]);
- glUniform4fv(maResources.m_2DColorID, 1, &extrude3D.id[0]);
+ glUniform4fv(maPickingResources.m_2DColorID, 1, &extrude3D.id[0]);
}
glDrawElements(GL_TRIANGLES, extrude3D.size[MIDDLE_SURFACE], GL_UNSIGNED_SHORT, reinterpret_cast<GLvoid*>(extrude3D.startIndex[MIDDLE_SURFACE]));
}
@@ -1455,7 +1455,7 @@ void OpenGL3DRenderer::RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D)
{
glm::mat4 aMVP = m_3DProjection * m_3DView * m_Model;
glUniformMatrix4fv(maPickingResources.m_MatrixID, 1, GL_FALSE, &aMVP[0][0]);
- glUniform4fv(maResources.m_2DColorID, 1, &extrude3D.id[0]);
+ glUniform4fv(maPickingResources.m_2DColorID, 1, &extrude3D.id[0]);
}
glDrawElements(GL_TRIANGLES, extrude3D.size[TOP_SURFACE], GL_UNSIGNED_SHORT, reinterpret_cast<GLvoid*>(extrude3D.startIndex[TOP_SURFACE]));
}
@@ -1485,7 +1485,7 @@ void OpenGL3DRenderer::RenderNonRoundedBar(const Extrude3DInfo& extrude3D)
{
glm::mat4 aMVP = m_3DProjection * m_3DView * m_Model;
glUniformMatrix4fv(maPickingResources.m_MatrixID, 1, GL_FALSE, &aMVP[0][0]);
- glUniform4fv(maResources.m_2DColorID, 1, &extrude3D.id[0]);
+ glUniform4fv(maPickingResources.m_2DColorID, 1, &extrude3D.id[0]);
}
glDrawArrays(GL_TRIANGLES, 0, 36);
}
@@ -1549,7 +1549,7 @@ void OpenGL3DRenderer::RenderExtrude3DObject()
GLuint normalBuf = extrude3DInfo.rounded ? m_CubeNormalBuf : m_BoundBoxNormal;
if(mbPickingMode)
- glUniform4fv(maResources.m_2DColorID, 1, &extrude3DInfo.id[0]);
+ glUniform4fv(maPickingResources.m_2DColorID, 1, &extrude3DInfo.id[0]);
// 1st attribute buffer : vertices
GLint aVertexID = mbPickingMode ? maPickingResources.m_2DVertexID : maResources.m_3DVertexID;