diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-09-01 00:03:05 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-09-01 00:03:05 (GMT) |
commit | 77305eb29e25bb4fff50e1df6f39d5adfdcac144 (patch) | |
tree | 88a98c78a04f654a3b5178f90ab3473c766855cc | |
parent | 75798ec85af2daa7d6350110840fdb4de07d914a (diff) | |
parent | 8ff041dab354609b730849320f4f31659089b37e (diff) | |
download | Qt-77305eb29e25bb4fff50e1df6f39d5adfdcac144.zip Qt-77305eb29e25bb4fff50e1df6f39d5adfdcac144.tar.gz Qt-77305eb29e25bb4fff50e1df6f39d5adfdcac144.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
-rw-r--r-- | src/opengl/qglextensions.cpp | 4 | ||||
-rw-r--r-- | src/opengl/qglshaderprogram.cpp | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/opengl/qglextensions.cpp b/src/opengl/qglextensions.cpp index e1ab6a4..a883c42 100644 --- a/src/opengl/qglextensions.cpp +++ b/src/opengl/qglextensions.cpp @@ -175,10 +175,10 @@ bool qt_resolve_glsl_extensions(QGLContext *ctx) #if defined(QT_OPENGL_ES_2) // The GLSL shader functions are always present in OpenGL/ES 2.0. // The only exceptions are glGetProgramBinaryOES and glProgramBinaryOES. - if (!QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glslResolved) { + if (!QGLContextPrivate::extensionFuncs(ctx).qt_glslResolved) { glGetProgramBinaryOES = (_glGetProgramBinaryOES) ctx->getProcAddress(QLatin1String("glGetProgramBinaryOES")); glProgramBinaryOES = (_glProgramBinaryOES) ctx->getProcAddress(QLatin1String("glProgramBinaryOES")); - QGLContextPrivate::qt_get_extension_funcs(ctx).qt_glslResolved = true; + QGLContextPrivate::extensionFuncs(ctx).qt_glslResolved = true; } return true; #else diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 61d8b10..c4d9322 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -1094,6 +1094,12 @@ QByteArray QGLShaderProgram::programBinary(int *format) const if (!isLinked()) return QByteArray(); + QGLContextGroup *ctx = d->ctx; +#ifndef QT_NO_DEBUG + if (!qt_check_sharing_with_current_context(ctx)) + qWarning("QGLShaderProgram::programBinary: Program is not associated with current context."); +#endif + // Get the length of the binary data, bailing out if there is none. GLint length = 0; glGetProgramiv(d->program, GL_PROGRAM_BINARY_LENGTH_OES, &length); @@ -1124,6 +1130,12 @@ QByteArray QGLShaderProgram::programBinary(int *format) const bool QGLShaderProgram::setProgramBinary(int format, const QByteArray& binary) { #if defined(QT_OPENGL_ES_2) + QGLContextGroup *ctx = d->ctx; +#ifndef QT_NO_DEBUG + if (!qt_check_sharing_with_current_context(ctx)) + qWarning("QGLShaderProgram::setProgramBinary: Program is not associated with current context."); +#endif + // Load the binary and check that it was linked correctly. glProgramBinaryOES(d->program, (GLenum)format, binary.constData(), binary.size()); |