diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-15 11:26:09 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-15 14:01:10 +0200 |
commit | 34e137f3a96682892dcbaa70c63deeb423f5fd8d (patch) | |
tree | 6ab7327d1a04ea06d68c303029383a93485d826b | |
parent | 42edee1ee1c993715a41b483eb4b67fb75a844e3 (diff) |
don"t execute code in a loop
Change-Id: I758d8ddb8b877638a5a36e56636e97fded790efc
-rw-r--r-- | chart2/source/view/main/GL3DRenderer.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index cbfebedb6e76..74116150e49c 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -677,16 +677,18 @@ void OpenGL3DRenderer::RenderLine3D(Polygon3DInfo &polygon) { size_t listNum = polygon.verticesList.size(); glUseProgram(maResources.m_CommonProID); + + PosVecf3 trans = {0.0f, 0, 0.0}; + PosVecf3 angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 scale = {1.0f, m_fHeightWeight, 1.0f}; + MoveModelf(trans, angle, scale); + + m_3DMVP = m_3DProjection * m_3DView * m_Model; + for (size_t i = 0; i < listNum; i++) { //move the circle to the pos, and scale using the xScale and Y scale Vertices3D *pointList = polygon.verticesList.front(); - PosVecf3 trans = {0.0f, 0, 0.0}; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {1.0f, m_fHeightWeight, 1.0f}; - MoveModelf(trans, angle, scale); - - m_3DMVP = m_3DProjection * m_3DView * m_Model; //if line only, using the common shader to render //render to fbo |