summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qopenglcontext.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-04-10 11:49:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-17 10:59:03 +0200
commit7aac93b6ce4e88c8e47c4b2cd8c283daeac5cdb3 (patch)
tree40a5eda5e056be7ad4a3740d91ba3b223daff491 /src/gui/kernel/qopenglcontext.cpp
parent8b0fd78caa8e257757d3eb84732e38cf735b2136 (diff)
Remove internal public function from QOpenGLFunctions
QOpenGLContext uses glGetTexLevelParameteriv on desktop OpenGL and so it got recently added to QOpenGLFunctions as part of the dynamic GL loading support. This is unnecessary since such desktop-only code can use the versioned wrappers (QOpenGLFunction_1_0 for example). In related upcoming changes in 5.4 the function is removed. This change has to be backported to 5.3 to prevent introducing this public API unnecessarily. Change-Id: I6fc331091e4e6416e430bf985afcc17a392fc2e3 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/kernel/qopenglcontext.cpp')
-rw-r--r--src/gui/kernel/qopenglcontext.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 7382d63a06..dbca05037b 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -61,6 +61,10 @@
#include <QDebug>
+#ifndef QT_OPENGL_ES_2
+#include <QOpenGLFunctions_1_0>
+#endif
+
QT_BEGIN_NAMESPACE
class QOpenGLVersionProfilePrivate
@@ -366,7 +370,9 @@ int QOpenGLContextPrivate::maxTextureSize()
GLint size;
GLint next = 64;
funcs->glTexImage2D(proxy, 0, GL_RGBA, next, next, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
- funcs->glGetTexLevelParameteriv(proxy, 0, GL_TEXTURE_WIDTH, &size);
+ QOpenGLFunctions_1_0 *gl1funcs = q->versionFunctions<QOpenGLFunctions_1_0>();
+ gl1funcs->initializeOpenGLFunctions();
+ gl1funcs->glGetTexLevelParameteriv(proxy, 0, GL_TEXTURE_WIDTH, &size);
if (size == 0) {
return max_texture_size;
}
@@ -377,7 +383,7 @@ int QOpenGLContextPrivate::maxTextureSize()
if (next > max_texture_size)
break;
funcs->glTexImage2D(proxy, 0, GL_RGBA, next, next, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
- funcs->glGetTexLevelParameteriv(proxy, 0, GL_TEXTURE_WIDTH, &next);
+ gl1funcs->glGetTexLevelParameteriv(proxy, 0, GL_TEXTURE_WIDTH, &next);
} while (next > size);
max_texture_size = size;