summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/surface3drenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/datavisualization/engine/surface3drenderer.cpp')
-rw-r--r--src/datavisualization/engine/surface3drenderer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/datavisualization/engine/surface3drenderer.cpp b/src/datavisualization/engine/surface3drenderer.cpp
index 26fab440..31da7af4 100644
--- a/src/datavisualization/engine/surface3drenderer.cpp
+++ b/src/datavisualization/engine/surface3drenderer.cpp
@@ -1123,8 +1123,10 @@ void Surface3DRenderer::drawScene(GLuint defaultFboHandle)
itModelMatrix.scale(gridLineScaleX);
// If we're viewing from below, grid line object must be flipped
- if (m_yFlipped)
+ if (m_yFlipped) {
modelMatrix.rotate(180.0f, 1.0, 0.0, 0.0);
+ itModelMatrix.rotate(180.0f, 1.0, 0.0, 0.0);
+ }
MVPMatrix = projectionViewMatrix * modelMatrix;
depthMVPMatrix = depthProjectionViewMatrix * modelMatrix;
@@ -1229,8 +1231,10 @@ void Surface3DRenderer::drawScene(GLuint defaultFboHandle)
itModelMatrix.scale(gridLineScaleZ);
// If we're viewing from below, grid line object must be flipped
- if (m_yFlipped)
+ if (m_yFlipped) {
modelMatrix.rotate(180.0f, 1.0, 0.0, 0.0);
+ itModelMatrix.rotate(180.0f, 1.0, 0.0, 0.0);
+ }
MVPMatrix = projectionViewMatrix * modelMatrix;
depthMVPMatrix = depthProjectionViewMatrix * modelMatrix;