diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-06-17 12:46:27 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-07-02 10:25:24 (GMT) |
commit | b2de72a51124333b639fdfbda829f54088dff838 (patch) | |
tree | b28b3b601351ae05d413315fe88781cefb7d98c8 /src/opengl/qgl.h | |
parent | 76a14c8254f4f8beb16de897f31bab13dc7609a4 (diff) | |
download | Qt-b2de72a51124333b639fdfbda829f54088dff838.zip Qt-b2de72a51124333b639fdfbda829f54088dff838.tar.gz Qt-b2de72a51124333b639fdfbda829f54088dff838.tar.bz2 |
Rework the internal GL resource system yet again.
Instead of having to sub-class QGLContextResource, we now have two
template classes:
1. 'QGLContextResource' to handle context specific resources that are
*not* shared in a group, even though the context itself is in a sharing
group
2. 'QGLContextGroupResource' to handle resources shared in a context
group.
Classes used as the template class type must have a constructor with
the following signature:
T(const QGLContext *);
The resources that the templates wrap are freed up when the context
or context group it is tied to is destroyed. The resource is also
freed when the QGLContext<Group>Resource object is destroyed, which
might lead to context switches, depending on where and in how many
non-sharing contexts the resource is used.
The templates wrap some boiler plate code that were common for all the
use cases.
Diffstat (limited to 'src/opengl/qgl.h')
-rw-r--r-- | src/opengl/qgl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index f0b36f7..d354f92 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -436,6 +436,7 @@ private: friend class QGLWidgetGLPaintDevice; friend class QX11GLPixmapData; friend class QX11GLSharedContexts; + friend class QGLContextResourceBase; private: Q_DISABLE_COPY(QGLContext) }; |