summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-01 07:52:09 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-01 07:52:09 (GMT)
commit871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f (patch)
treed9dcf9d8437c7a7777f64ce41f5f55a44269fee7 /src/opengl/qgl_p.h
parentf23ab31348bb6d3c6b7cb1ccf429ea932824e4e4 (diff)
downloadQt-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/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index a113b0f..9b09c7c 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -405,7 +405,6 @@ public:
QGLShareRegister() {}
~QGLShareRegister() { reg.clear(); }
- bool checkSharing(const QGLContext *context1, const QGLContext *context2);
void addShare(const QGLContext *context, const QGLContext *share);
QList<const QGLContext *> shares(const QGLContext *context);
void removeShare(const QGLContext *context);
@@ -436,7 +435,7 @@ public:
QGLContext *current = const_cast<QGLContext *>(QGLContext::currentContext());
QGLContext *ctx = const_cast<QGLContext *>(context);
Q_ASSERT(ctx);
- bool switch_context = current != ctx && !qgl_share_reg()->checkSharing(current, ctx);
+ bool switch_context = current != ctx && !QGLContext::areSharing(current, ctx);
if (switch_context)
ctx->makeCurrent();
#if defined(Q_WS_X11)
@@ -547,7 +546,7 @@ public:
: m_oldContext(0)
{
QGLContext *currentContext = const_cast<QGLContext *>(QGLContext::currentContext());
- if (currentContext != ctx && !qgl_share_reg()->checkSharing(ctx, currentContext)) {
+ if (currentContext != ctx && !QGLContext::areSharing(ctx, currentContext)) {
m_oldContext = currentContext;
m_ctx = const_cast<QGLContext *>(ctx);
m_ctx->makeCurrent();