summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 1bdc9b84e0..1fbff0f0fe 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2517,14 +2517,13 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target,
/*! \internal */
int QGLContextPrivate::maxTextureSize()
{
- Q_Q(QGLContext);
-
if (max_texture_size != -1)
return max_texture_size;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
#ifndef QT_OPENGL_ES
+ Q_Q(QGLContext);
if (!q->contextHandle()->isES()) {
GLenum proxy = GL_PROXY_TEXTURE_2D;