From 4b2f35d04ca3c2e037b4d0edd8b2350051cc572c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 28 Feb 2014 17:03:57 +0100 Subject: Dynamic GL: remove exporting symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jørgen Lind --- src/opengl/qglshaderprogram.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/opengl/qglshaderprogram.cpp') diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 6b8d38ef42..7261b68a88 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -248,7 +248,7 @@ bool QGLShaderPrivate::create() shader = glfuncs->glCreateShader(GL_VERTEX_SHADER); #if !defined(QT_OPENGL_ES_2) else if (shaderType == QGLShader::Geometry - && !QOpenGLFunctions::isES()) + && !context->contextHandle()->isES()) shader = glfuncs->glCreateShader(GL_GEOMETRY_SHADER_EXT); #endif else @@ -430,14 +430,14 @@ bool QGLShader::compileSourceCode(const char *source) srclen.append(GLint(headerLen)); } #ifdef QGL_DEFINE_QUALIFIERS - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { src.append(qualifierDefines); srclen.append(GLint(sizeof(qualifierDefines) - 1)); } #endif #ifdef QGL_REDEFINE_HIGHP if (d->shaderType == Fragment - && QOpenGLFunctions::isES()) { + && QOpenGLContext::currentContext()->isES()) { src.append(redefineHighp); srclen.append(GLint(sizeof(redefineHighp) - 1)); } @@ -567,8 +567,8 @@ public: void initializeGeometryShaderFunctions() { - if (!QOpenGLFunctions::isES()) { - QOpenGLContext *context = QOpenGLContext::currentContext(); + QOpenGLContext *context = QOpenGLContext::currentContext(); + if (!context->isES()) { glProgramParameteri = (type_glProgramParameteri) context->getProcAddress("glProgramParameteri"); @@ -936,7 +936,7 @@ bool QGLShaderProgram::link() #if !defined(QT_OPENGL_ES_2) // Set up the geometry shader parameters - if (!QOpenGLFunctions::isES() + if (!QOpenGLContext::currentContext()->isES() && d->glfuncs->glProgramParameteri) { foreach (QGLShader *shader, d->shaders) { if (shader->shaderType() & QGLShader::Geometry) { @@ -3068,7 +3068,7 @@ int QGLShaderProgram::maxGeometryOutputVertices() const { GLint n = 0; #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) + if (!QOpenGLContext::currentContext()->isES()) glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT, &n); #endif return n; -- cgit v1.2.3