demos/boxes/scene.cpp
changeset 18 2f34d5167611
parent 3 41300fa6a67c
--- a/demos/boxes/scene.cpp	Tue Feb 02 00:43:10 2010 +0200
+++ b/demos/boxes/scene.cpp	Fri Apr 16 15:50:13 2010 +0300
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -653,7 +653,8 @@
 
 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 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];