From a4ec90175c76ce35688acc06cdf93e9cab886223 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 3 Mar 2014 21:20:30 +0100 Subject: purge vestiges of opengl es 1 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit amends 0d5170256c1. Change-Id: Ifa178d38f602bb7c66ef13334673ff47e332af5b Reviewed-by: Jørgen Lind Reviewed-by: Laszlo Agocs --- src/gui/gui.pro | 9 +-------- src/gui/kernel/qopenglcontext.cpp | 3 --- src/gui/kernel/qopenglcontext.h | 3 +-- src/gui/opengl/qopenglbuffer.cpp | 16 +++++++--------- src/gui/opengl/qopenglfunctions.cpp | 22 +--------------------- src/opengl/opengl.pro | 1 - src/opengl/qglbuffer.cpp | 16 +++++++--------- src/opengl/qglfunctions.cpp | 22 +--------------------- src/openglextensions/openglextensions.pro | 1 - src/src.pro | 4 ++-- 10 files changed, 20 insertions(+), 77 deletions(-) (limited to 'src') diff --git a/src/gui/gui.pro b/src/gui/gui.pro index f083245809..c5262501ac 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -67,14 +67,7 @@ contains(QT_CONFIG, angle) { !isEmpty(QMAKE_LIBDIR_EGL): CMAKE_EGL_LIBDIR += $$cmakeTargetPath($$QMAKE_LIBDIR_EGL) } - contains(QT_CONFIG, opengles1) { - !isEmpty(QMAKE_INCDIR_OPENGL_ES1): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL_ES1) - CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL_ES1) - CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL_ES1) - !isEmpty(QMAKE_LIBDIR_OPENGL_ES1): CMAKE_OPENGL_LIBDIR = $$cmakePortablePaths($$QMAKE_LIBDIR_OPENGL_ES1) - CMAKE_GL_HEADER_NAME = GLES/gl.h - CMAKE_QT_OPENGL_IMPLEMENTATION = GLES - } else:contains(QT_CONFIG, opengles2) { + contains(QT_CONFIG, opengles2) { !isEmpty(QMAKE_INCDIR_OPENGL_ES2): CMAKE_GL_INCDIRS = $$cmakeTargetPaths($$QMAKE_INCDIR_OPENGL_ES2) CMAKE_OPENGL_INCDIRS = $$cmakePortablePaths($$QMAKE_INCDIR_OPENGL_ES2) CMAKE_OPENGL_LIBS = $$cmakeProcessLibs($$QMAKE_LIBS_OPENGL_ES2) diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 55fe036fe0..7a901a2877 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -1030,7 +1030,6 @@ void *QOpenGLContext::openGLModuleHandle() \value DesktopGL Desktop OpenGL \value GLES2 OpenGL ES 2.0 or higher - \value GLES1 OpenGL ES 1.x \since 5.3 */ @@ -1058,8 +1057,6 @@ QOpenGLContext::OpenGLModuleType QOpenGLContext::openGLModuleType() return QGuiApplicationPrivate::instance()->platformIntegration()->openGLModuleType(); #elif defined(QT_OPENGL_ES_2) return GLES2; -#elif defined(QT_OPENGL_ES) - return GLES1; #else return DesktopGL; #endif diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h index 06a7b723b4..fce983f975 100644 --- a/src/gui/kernel/qopenglcontext.h +++ b/src/gui/kernel/qopenglcontext.h @@ -196,8 +196,7 @@ public: enum OpenGLModuleType { DesktopGL, - GLES2, - GLES1 + GLES2 }; static OpenGLModuleType openGLModuleType(); diff --git a/src/gui/opengl/qopenglbuffer.cpp b/src/gui/opengl/qopenglbuffer.cpp index 2e1a4577f6..a8a2255104 100644 --- a/src/gui/opengl/qopenglbuffer.cpp +++ b/src/gui/opengl/qopenglbuffer.cpp @@ -333,20 +333,18 @@ void QOpenGLBuffer::destroy() bool QOpenGLBuffer::read(int offset, void *data, int count) { #if !defined(QT_OPENGL_ES) - if (QOpenGLContext::openGLModuleType() != QOpenGLContext::GLES1) { - Q_D(QOpenGLBuffer); - if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id()) - return false; - while (d->funcs->glGetError() != GL_NO_ERROR) ; // Clear error state. - d->funcs->glGetBufferSubData(d->type, offset, count, data); - return d->funcs->glGetError() == GL_NO_ERROR; - } + Q_D(QOpenGLBuffer); + if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id()) + return false; + while (d->funcs->glGetError() != GL_NO_ERROR) ; // Clear error state. + d->funcs->glGetBufferSubData(d->type, offset, count, data); + return d->funcs->glGetError() == GL_NO_ERROR; #else Q_UNUSED(offset); Q_UNUSED(data); Q_UNUSED(count); -#endif return false; +#endif } /*! diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index ef0ef6d103..eb2c98e1f5 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -256,7 +256,7 @@ QOpenGLExtensions::QOpenGLExtensions(QOpenGLContext *context) static int qt_gl_resolve_features() { QOpenGLContext *ctx = QOpenGLContext::currentContext(); - if (ctx->isES() && QOpenGLContext::openGLModuleType() != QOpenGLContext::GLES1) { + if (ctx->isES()) { // OpenGL ES 2 int features = QOpenGLFunctions::Multitexture | QOpenGLFunctions::Shaders | @@ -277,26 +277,6 @@ static int qt_gl_resolve_features() features |= QOpenGLFunctions::NPOTTextures | QOpenGLFunctions::NPOTTextureRepeat; return features; - } else if (ctx->isES()) { - // OpenGL ES 1 - int features = QOpenGLFunctions::Multitexture | - QOpenGLFunctions::Buffers | - QOpenGLFunctions::CompressedTextures | - QOpenGLFunctions::Multisample; - QOpenGLExtensionMatcher extensions; - if (extensions.match("GL_OES_framebuffer_object")) - features |= QOpenGLFunctions::Framebuffers; - if (extensions.match("GL_OES_blend_equation_separate")) - features |= QOpenGLFunctions::BlendEquationSeparate; - if (extensions.match("GL_OES_blend_func_separate")) - features |= QOpenGLFunctions::BlendFuncSeparate; - if (extensions.match("GL_OES_blend_subtract")) - features |= QOpenGLFunctions::BlendSubtract; - if (extensions.match("GL_OES_texture_npot")) - features |= QOpenGLFunctions::NPOTTextures; - if (extensions.match("GL_IMG_texture_npot")) - features |= QOpenGLFunctions::NPOTTextures; - return features; } else { // OpenGL int features = 0; diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index 4d9208d983..5cd553a5e8 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -11,7 +11,6 @@ QMAKE_DOCS = $$PWD/doc/qtopengl.qdocconf load(qt_module) contains(QT_CONFIG, opengl):CONFIG += opengl -contains(QT_CONFIG, opengles1):CONFIG += opengles1 contains(QT_CONFIG, opengles2):CONFIG += opengles2 contains(QT_CONFIG, egl):CONFIG += egl diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp index 0bcb9d4f1f..1c9545990f 100644 --- a/src/opengl/qglbuffer.cpp +++ b/src/opengl/qglbuffer.cpp @@ -344,20 +344,18 @@ void QGLBuffer::destroy() bool QGLBuffer::read(int offset, void *data, int count) { #if !defined(QT_OPENGL_ES) - if (QOpenGLContext::openGLModuleType() != QOpenGLContext::GLES1) { - Q_D(QGLBuffer); - if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id()) - return false; - while (glGetError() != GL_NO_ERROR) ; // Clear error state. - d->funcs->glGetBufferSubData(d->type, offset, count, data); - return glGetError() == GL_NO_ERROR; - } + Q_D(QGLBuffer); + if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id()) + return false; + while (glGetError() != GL_NO_ERROR) ; // Clear error state. + d->funcs->glGetBufferSubData(d->type, offset, count, data); + return glGetError() == GL_NO_ERROR; #else Q_UNUSED(offset); Q_UNUSED(data); Q_UNUSED(count); -#endif return false; +#endif } /*! diff --git a/src/opengl/qglfunctions.cpp b/src/opengl/qglfunctions.cpp index d6d77d0568..42b3b47f7f 100644 --- a/src/opengl/qglfunctions.cpp +++ b/src/opengl/qglfunctions.cpp @@ -223,7 +223,7 @@ QGLFunctions::QGLFunctions(const QGLContext *context) static int qt_gl_resolve_features() { QOpenGLContext *ctx = QOpenGLContext::currentContext(); - if (ctx->isES() && QOpenGLContext::openGLModuleType() != QOpenGLContext::GLES1) { + if (ctx->isES()) { // OpenGL ES 2 int features = QGLFunctions::Multitexture | QGLFunctions::Shaders | @@ -243,26 +243,6 @@ static int qt_gl_resolve_features() if (extensions.match("GL_IMG_texture_npot")) features |= QGLFunctions::NPOTTextures; return features; - } else if (ctx->isES()) { - // OpenGL ES 1 - int features = QGLFunctions::Multitexture | - QGLFunctions::Buffers | - QGLFunctions::CompressedTextures | - QGLFunctions::Multisample; - QOpenGLExtensionMatcher extensions; - if (extensions.match("GL_OES_framebuffer_object")) - features |= QGLFunctions::Framebuffers; - if (extensions.match("GL_OES_blend_equation_separate")) - features |= QGLFunctions::BlendEquationSeparate; - if (extensions.match("GL_OES_blend_func_separate")) - features |= QGLFunctions::BlendFuncSeparate; - if (extensions.match("GL_OES_blend_subtract")) - features |= QGLFunctions::BlendSubtract; - if (extensions.match("GL_OES_texture_npot")) - features |= QGLFunctions::NPOTTextures; - if (extensions.match("GL_IMG_texture_npot")) - features |= QGLFunctions::NPOTTextures; - return features; } else { // OpenGL int features = 0; diff --git a/src/openglextensions/openglextensions.pro b/src/openglextensions/openglextensions.pro index e303dea5e8..948465165e 100644 --- a/src/openglextensions/openglextensions.pro +++ b/src/openglextensions/openglextensions.pro @@ -2,7 +2,6 @@ TARGET = QtOpenGLExtensions CONFIG += static contains(QT_CONFIG, opengl):CONFIG += opengl -contains(QT_CONFIG, opengles1):CONFIG += opengles1 contains(QT_CONFIG, opengles2):CONFIG += opengles2 load(qt_module) diff --git a/src/src.pro b/src/src.pro index 0d854a85c1..6a805a6a06 100644 --- a/src/src.pro +++ b/src/src.pro @@ -142,13 +142,13 @@ contains(QT_CONFIG, concurrent):SUBDIRS += src_concurrent src_gui.depends += src_angle } SUBDIRS += src_gui src_platformsupport - contains(QT_CONFIG, opengl(es1|es2)?):SUBDIRS += src_openglextensions + contains(QT_CONFIG, opengl(es2)?):SUBDIRS += src_openglextensions src_plugins.depends += src_gui src_platformsupport !contains(QT_CONFIG, no-widgets) { SUBDIRS += src_tools_uic src_widgets TOOLS += src_tools_uic src_plugins.depends += src_widgets - contains(QT_CONFIG, opengl(es1|es2)?):!contains(QT_CONFIG, dynamicgl) { + contains(QT_CONFIG, opengl(es2)?):!contains(QT_CONFIG, dynamicgl) { SUBDIRS += src_opengl src_plugins.depends += src_opengl } -- cgit v1.2.3