diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-01 07:52:09 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-01 07:52:09 (GMT) |
commit | 871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f (patch) | |
tree | d9dcf9d8437c7a7777f64ce41f5f55a44269fee7 /src/opengl/qglshaderprogram.cpp | |
parent | f23ab31348bb6d3c6b7cb1ccf429ea932824e4e4 (diff) | |
download | Qt-871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f.zip Qt-871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f.tar.gz Qt-871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f.tar.bz2 |
QGLContext::areSharing() to check for GL share relationships
Reviewed-by: Samuel
Diffstat (limited to 'src/opengl/qglshaderprogram.cpp')
-rw-r--r-- | src/opengl/qglshaderprogram.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index ebcd723..dfa6c40 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -349,7 +349,7 @@ QGLShader::QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObj context = QGLContext::currentContext(); d = new QGLShaderPrivate(context, type); #ifndef QT_NO_DEBUG - if (context && !qgl_share_reg()->checkSharing(context, QGLContext::currentContext())) { + if (context && !QGLContext::areSharing(context, QGLContext::currentContext())) { qWarning("QGLShader::QGLShader: \'context\' must be the currect context or sharing with it."); return; } @@ -374,7 +374,7 @@ QGLShader::QGLShader context = QGLContext::currentContext(); d = new QGLShaderPrivate(context, type); #ifndef QT_NO_DEBUG - if (context && !qgl_share_reg()->checkSharing(context, QGLContext::currentContext())) { + if (context && !QGLContext::areSharing(context, QGLContext::currentContext())) { qWarning("QGLShader::QGLShader: \'context\' must be currect context or sharing with it."); return; } @@ -806,8 +806,8 @@ bool QGLShaderProgram::addShader(QGLShader *shader) if (d->shaders.contains(shader)) return true; // Already added to this shader program. if (d->programGuard.id() && shader) { - if (!qgl_share_reg()->checkSharing(shader->d->shaderGuard.context(), - d->programGuard.context())) { + if (!QGLContext::areSharing(shader->d->shaderGuard.context(), + d->programGuard.context())) { qWarning("QGLShaderProgram::addShader: Program and shader are not associated with same context."); return false; } |