summaryrefslogtreecommitdiffstats
path: root/demos/boxes
diff options
context:
space:
mode:
Diffstat (limited to 'demos/boxes')
-rw-r--r--demos/boxes/scene.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp
index 452f4ef..9b36b81 100644
--- a/demos/boxes/scene.cpp
+++ b/demos/boxes/scene.cpp
@@ -653,7 +653,8 @@ void Scene::initGL()
static void loadMatrix(const QMatrix4x4& m)
{
- GLfloat mat[16];
+ // static to prevent glLoadMatrixf to fail on certain drivers
+ static GLfloat mat[16];
const qreal *data = m.constData();
for (int index = 0; index < 16; ++index)
mat[index] = data[index];
@@ -662,7 +663,8 @@ static void loadMatrix(const QMatrix4x4& m)
static void multMatrix(const QMatrix4x4& m)
{
- GLfloat mat[16];
+ // static to prevent glMultMatrixf to fail on certain drivers
+ static GLfloat mat[16];
const qreal *data = m.constData();
for (int index = 0; index < 16; ++index)
mat[index] = data[index];