diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-04 11:35:17 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-04 11:35:17 (GMT) |
commit | b576bca55f88ed749a0a2b409be986dbf6b96b0a (patch) | |
tree | 69789d636ff2328cfc4101851f9a28de4a2a825e /demos | |
parent | 0b8062f5fbd7622a528ce61b767d00fbcdfc74a0 (diff) | |
parent | 9d85dcf10d580a45c261e3e1a8d8df7d41cb9437 (diff) | |
download | Qt-b576bca55f88ed749a0a2b409be986dbf6b96b0a.zip Qt-b576bca55f88ed749a0a2b409be986dbf6b96b0a.tar.gz Qt-b576bca55f88ed749a0a2b409be986dbf6b96b0a.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'demos')
-rw-r--r-- | demos/boxes/scene.cpp | 28 | ||||
-rw-r--r-- | demos/embedded/fluidlauncher/pictureflow.cpp | 4 | ||||
-rw-r--r-- | demos/embedded/fluidlauncher/pictureflow.h | 2 | ||||
-rw-r--r-- | demos/qtdemo/colors.cpp | 2 |
4 files changed, 26 insertions, 10 deletions
diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp index 2a7ca0e..7c0d4d8 100644 --- a/demos/boxes/scene.cpp +++ b/demos/boxes/scene.cpp @@ -649,6 +649,24 @@ void Scene::initGL() m_renderOptions->emitParameterChanged(); } +static void loadMatrix(const QMatrix4x4& m) +{ + GLfloat mat[16]; + const qreal *data = m.constData(); + for (int index = 0; index < 16; ++index) + mat[index] = data[index]; + glLoadMatrixf(mat); +} + +static void multMatrix(const QMatrix4x4& m) +{ + GLfloat mat[16]; + const qreal *data = m.constData(); + for (int index = 0; index < 16; ++index) + mat[index] = data[index]; + glMultMatrixf(mat); +} + // If one of the boxes should not be rendered, set excludeBox to its index. // If the main box should not be rendered, set excludeBox to -1. void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) @@ -673,7 +691,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) viewRotation(3, 0) = viewRotation(3, 1) = viewRotation(3, 2) = 0.0f; viewRotation(0, 3) = viewRotation(1, 3) = viewRotation(2, 3) = 0.0f; viewRotation(3, 3) = 1.0f; - glLoadMatrixf(viewRotation.data()); + loadMatrix(viewRotation); glScalef(20.0f, 20.0f, 20.0f); // Don't render the environment if the environment texture can't be set for the correct sampler. @@ -688,7 +706,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) m_environment->unbind(); } - glLoadMatrixf(view.data()); + loadMatrix(view); glEnable(GL_CULL_FACE); glEnable(GL_LIGHTING); @@ -702,7 +720,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) m.rotate(m_trackBalls[1].rotation()); m = m.transposed(); - glMultMatrixf(m.data()); + multMatrix(m); glRotatef(360.0f * i / m_programs.size(), 0.0f, 0.0f, 1.0f); glTranslatef(2.0f, 0.0f, 0.0f); @@ -736,7 +754,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) QMatrix4x4 m; m.rotate(m_trackBalls[0].rotation()); m = m.transposed(); - glMultMatrixf(m.data()); + multMatrix(m); if (glActiveTexture) { if (m_dynamicCubemap) @@ -842,7 +860,7 @@ void Scene::renderCubemaps() glMatrixMode(GL_PROJECTION); glPushMatrix(); - glLoadMatrixf(mat.data()); + loadMatrix(mat); glMatrixMode(GL_MODELVIEW); glPushMatrix(); diff --git a/demos/embedded/fluidlauncher/pictureflow.cpp b/demos/embedded/fluidlauncher/pictureflow.cpp index 9eeaa26..293ef99 100644 --- a/demos/embedded/fluidlauncher/pictureflow.cpp +++ b/demos/embedded/fluidlauncher/pictureflow.cpp @@ -3,10 +3,6 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtGui module of the Qt Toolkit. -** -** This is a version of the Pictureflow animated image show widget modified by Nokia. -** ** This file is part of the ActiveQt framework of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ diff --git a/demos/embedded/fluidlauncher/pictureflow.h b/demos/embedded/fluidlauncher/pictureflow.h index 7ae2a88..8fc145c 100644 --- a/demos/embedded/fluidlauncher/pictureflow.h +++ b/demos/embedded/fluidlauncher/pictureflow.h @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This is a version of the Pictureflow animated image show widget modified by Nokia. +** This file is part of the ActiveQt framework of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp index e63417c..455ba0c 100644 --- a/demos/qtdemo/colors.cpp +++ b/demos/qtdemo/colors.cpp @@ -274,6 +274,8 @@ void Colors::parseArgs(int argc, char *argv[]) + "[-low] [-ticker-letters<int>] [-ticker-speed<float>] [-no-ticker-morph] " + "[-ticker-morph-speed<float>] [-ticker-text<string>]"); exit(0); + } else if (s == "-verbose") { + // this option was already handled above } else{ QMessageBox::warning(0, "QtDemo", QString("Unrecognized argument:\n") + s); exit(0); |