summaryrefslogtreecommitdiffstats
path: root/demos/boxes/scene.cpp
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-09-04 15:00:06 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-09-04 15:14:38 (GMT)
commit3959edcf4c4a531e87c9296ba401bd0f08caaed4 (patch)
treeeb078eb259766977f5ec9de22e6fd46c0b1040ea /demos/boxes/scene.cpp
parent1dd1400a84831da7377dadd2521460f129e9640a (diff)
downloadQt-3959edcf4c4a531e87c9296ba401bd0f08caaed4.zip
Qt-3959edcf4c4a531e87c9296ba401bd0f08caaed4.tar.gz
Qt-3959edcf4c4a531e87c9296ba401bd0f08caaed4.tar.bz2
Fixed object rotations in the boxes demo.
When Math3D was introduced, the boxes demo was changed to use the classes in the new module, but the change caused some bugs with the object rotations. This commit should fix them. Reviewed-by: Samuel
Diffstat (limited to 'demos/boxes/scene.cpp')
-rw-r--r--demos/boxes/scene.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp
index 7c0d4d8..0975fc5 100644
--- a/demos/boxes/scene.cpp
+++ b/demos/boxes/scene.cpp
@@ -718,8 +718,6 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox)
glPushMatrix();
QMatrix4x4 m;
m.rotate(m_trackBalls[1].rotation());
- m = m.transposed();
-
multMatrix(m);
glRotatef(360.0f * i / m_programs.size(), 0.0f, 0.0f, 1.0f);
@@ -753,7 +751,6 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox)
if (-1 != excludeBox) {
QMatrix4x4 m;
m.rotate(m_trackBalls[0].rotation());
- m = m.transposed();
multMatrix(m);
if (glActiveTexture) {
@@ -880,7 +877,7 @@ void Scene::renderCubemaps()
GLRenderTargetCube::getViewMatrix(mat, face);
QVector4D v = QVector4D(-center.x(), -center.y(), -center.z(), 1.0);
- mat.setColumn(3, v * mat);
+ mat.setColumn(3, mat * v);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
renderBoxes(mat, i);