summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 3f496a4ffc..f1ce2cfae3 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -4467,13 +4467,13 @@ void QGLWidget::renderText(double x, double y, double z, const QString &str, con
int width = d->glcx->device()->width();
int height = d->glcx->device()->height();
- GLdouble model[4][4], proj[4][4];
+ GLdouble model[4 * 4], proj[4 * 4];
GLint view[4];
- glGetDoublev(GL_MODELVIEW_MATRIX, &model[0][0]);
- glGetDoublev(GL_PROJECTION_MATRIX, &proj[0][0]);
+ glGetDoublev(GL_MODELVIEW_MATRIX, &model[0]);
+ glGetDoublev(GL_PROJECTION_MATRIX, &proj[0]);
glGetIntegerv(GL_VIEWPORT, &view[0]);
GLdouble win_x = 0, win_y = 0, win_z = 0;
- qgluProject(x, y, z, &model[0][0], &proj[0][0], &view[0],
+ qgluProject(x, y, z, &model[0], &proj[0], &view[0],
&win_x, &win_y, &win_z);
win_y = height - win_y; // y is inverted