diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-08-31 23:55:11 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-08-31 23:55:11 (GMT) |
commit | 8ff041dab354609b730849320f4f31659089b37e (patch) | |
tree | f2efb2c8bcf1b0b5b5c2e7794f7fd69f9d898b46 /src/opengl | |
parent | 4f72c6385b8d348611a907e6a8533de055188729 (diff) | |
download | Qt-8ff041dab354609b730849320f4f31659089b37e.zip Qt-8ff041dab354609b730849320f4f31659089b37e.tar.gz Qt-8ff041dab354609b730849320f4f31659089b37e.tar.bz2 |
OpenGL/ES 2.0 compilation problem since QGLContextGroup changes
Reviewed-by: trustme
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qglshaderprogram.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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()); |