diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-07-20 10:41:47 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-07-21 13:54:48 (GMT) |
commit | 8c97cd7a91e99a2665e871efe1bf577e33eaff3a (patch) | |
tree | 3464c28b1f850d6d1d194bb881f3cdecaa9daab1 /src/opengl/qgl.h | |
parent | 40649c420601bcc1f639fc8b337bfd7375d2b37e (diff) | |
download | Qt-8c97cd7a91e99a2665e871efe1bf577e33eaff3a.zip Qt-8c97cd7a91e99a2665e871efe1bf577e33eaff3a.tar.gz Qt-8c97cd7a91e99a2665e871efe1bf577e33eaff3a.tar.bz2 |
Fixed GL2 engine shader manager to work with more than one context.
I added a QGLContextResource class which can be used internally in Qt
for sharing resources between contexts. The QGLContextResource is a
hash map where the context is used as 'key', and the resource is the
'value'. All the sharing contexts point to the same resource, and the
resource is automatically deleted when it is not referenced any more.
Now, the shader manager uses the QGLContextResource class.
I also added a pointer to a struct in the QGLContextPrivate class. The
struct is shared between all the sharing contexts and is deleted
automatically. Currently, the struct only contains the resolved OpenGL
function pointers.
The shared context register code has been simplified.
Reviewed-by: Tom
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 86555da..31b9543 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -364,6 +364,7 @@ private: friend class QGLPixmapData; friend class QGLPixmapFilterBase; friend class QGLTextureGlyphCache; + friend class QGLShareRegister; friend QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags(); #ifdef Q_WS_MAC public: |