summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglfunctions.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-02-28 17:03:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-04 15:59:05 +0100
commit4b2f35d04ca3c2e037b4d0edd8b2350051cc572c (patch)
treeb6cf33e9cba3e55b11be748fa37fd44b09021b54 /src/opengl/qglfunctions.cpp
parentfe2ce05d23a52d27e50270d22eb9fff9ab091dd4 (diff)
Dynamic GL: remove exporting symbols
Remove the opengl proxy for now. Later it will either be moved into a separate library or replaced by a QOpenGLFunctions-based approach. This means that the -opengl dynamic configuration is not usable for the time being. The rest of the enablers remain in place. The convenience function QOpenGLFunctions::isES() is now moved to QOpenGLContext and is changed to check the renderable type. This is extremely useful since besides supporting dynamic GL it solves also the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES path when creating an ES-compatible context with a desktop OpenGL implementation). Task-number: QTBUG-36483 Task-number: QTBUG-37172 Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/opengl/qglfunctions.cpp')
-rw-r--r--src/opengl/qglfunctions.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/opengl/qglfunctions.cpp b/src/opengl/qglfunctions.cpp
index e75f9cf915..7dc30d5319 100644
--- a/src/opengl/qglfunctions.cpp
+++ b/src/opengl/qglfunctions.cpp
@@ -213,7 +213,9 @@ QGLFunctions::QGLFunctions(const QGLContext *context)
static int qt_gl_resolve_features()
{
- if (QOpenGLFunctions::platformGLType() == QOpenGLFunctions::GLES2) {
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
+ if (ctx->isES() && QOpenGLContext::openGLModuleType() != QOpenGLContext::GLES1) {
+ // OpenGL ES 2
int features = QGLFunctions::Multitexture |
QGLFunctions::Shaders |
QGLFunctions::Buffers |
@@ -232,7 +234,8 @@ static int qt_gl_resolve_features()
if (extensions.match("GL_IMG_texture_npot"))
features |= QGLFunctions::NPOTTextures;
return features;
- } if (QOpenGLFunctions::platformGLType() == QOpenGLFunctions::GLES1) {
+ } else if (ctx->isES()) {
+ // OpenGL ES 1
int features = QGLFunctions::Multitexture |
QGLFunctions::Buffers |
QGLFunctions::CompressedTextures |
@@ -252,6 +255,7 @@ static int qt_gl_resolve_features()
features |= QGLFunctions::NPOTTextures;
return features;
} else {
+ // OpenGL
int features = 0;
QGLFormat::OpenGLVersionFlags versions = QGLFormat::openGLVersionFlags();
QOpenGLExtensionMatcher extensions;