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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/datavisualization/engine/surface3drenderer.cpp b/src/datavisualization/engine/surface3drenderer.cpp
index 4ce8d2c7..26fab440 100644
--- a/src/datavisualization/engine/surface3drenderer.cpp
+++ b/src/datavisualization/engine/surface3drenderer.cpp
@@ -1027,7 +1027,6 @@ void Surface3DRenderer::drawScene(GLuint defaultFboHandle)
QVector3D bgScale(m_scaleXWithBackground, backgroundMargin, m_scaleZWithBackground);
modelMatrix.scale(bgScale);
- itModelMatrix.scale(bgScale);
// If we're viewing from below, background object must be flipped
if (m_yFlipped) {
@@ -1037,6 +1036,8 @@ void Surface3DRenderer::drawScene(GLuint defaultFboHandle)
modelMatrix.rotate(backgroundRotation, 0.0f, 1.0f, 0.0f);
}
+ itModelMatrix = modelMatrix; // Only scaling and rotations, can be used directly
+
#ifdef SHOW_DEPTH_TEXTURE_SCENE
MVPMatrix = depthProjectionViewMatrix * modelMatrix;
#else