summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_qws.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-09-09 06:23:54 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-09-09 06:23:54 (GMT)
commit6eb6920d134ee6a0cc0f27d63d65003a3d9c1fee (patch)
treee4abaa818134c282dc37e62a241d9b7b89b5fb0b /src/opengl/qgl_qws.cpp
parent39bcbc8df52eb5df5f7e39dc4265c8a77d3881be (diff)
downloadQt-6eb6920d134ee6a0cc0f27d63d65003a3d9c1fee.zip
Qt-6eb6920d134ee6a0cc0f27d63d65003a3d9c1fee.tar.gz
Qt-6eb6920d134ee6a0cc0f27d63d65003a3d9c1fee.tar.bz2
Clean up shader programs properly
QGLShader and QGLShaderProgram used to delete the GL object id in the wrong context. But fixing this means we must keep track of when contexts are destroyed so that we don't try to access a context from a shader if it goes away. We also need to transfer ownership from one context to another when they are shared. This change introduces QGLSharedResourceGuard, which keeps track of a context and a GL object identifier. When the context goes away, ownership is passed to a shared context. When there are no more shared contexts, the identifier automatically zeroes. Reviewed-by: trustme
Diffstat (limited to 'src/opengl/qgl_qws.cpp')
0 files changed, 0 insertions, 0 deletions