diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-13 08:54:45 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-13 08:54:45 +0200 |
commit | b62bd0584a7872b6917917009b707785b3abd077 (patch) | |
tree | 9981f274712c098cabbff0c4667672a3934e5393 /src/opengl/qglframebufferobject_p.h | |
parent | 5e10745dca1d10025404a9f268f03ae697fb10cc (diff) | |
parent | 97baad65f65783d2b5ff938f6217aec9434f2e5f (diff) |
Merge branch 'refactor'
Conflicts:
mkspecs/qws/linux-lsb-g++/qmake.conf
src/gui/image/qpixmap_mac.cpp
src/gui/painting/qpaintengine_x11.cpp
src/gui/painting/qtessellator.cpp
src/gui/text/qfontengine_qws.cpp
src/gui/text/qfontengine_x11.cpp
src/gui/widgets/qlinecontrol.cpp
src/opengl/qgl.h
src/opengl/qgl_x11egl.cpp
src/plugins/plugins.pro
Change-Id: If52dcd55cd55f2983a756c2f843967702b60a310
Diffstat (limited to 'src/opengl/qglframebufferobject_p.h')
-rw-r--r-- | src/opengl/qglframebufferobject_p.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h index f82361279d..61d39c6a07 100644 --- a/src/opengl/qglframebufferobject_p.h +++ b/src/opengl/qglframebufferobject_p.h @@ -130,8 +130,9 @@ private: class QGLFramebufferObjectPrivate { public: - QGLFramebufferObjectPrivate() : fbo_guard(0), texture(0), depth_buffer(0), stencil_buffer(0) - , color_buffer(0), valid(false), engine(0) {} + QGLFramebufferObjectPrivate() : fbo_guard(0), texture_guard(0), depth_buffer_guard(0) + , stencil_buffer_guard(0), color_buffer_guard(0) + , valid(false), engine(0) {} ~QGLFramebufferObjectPrivate() {} void init(QGLFramebufferObject *q, const QSize& sz, @@ -139,11 +140,11 @@ public: GLenum internal_format, GLenum texture_target, GLint samples = 0, bool mipmap = false); bool checkFramebufferStatus() const; - QGLSharedResourceGuard fbo_guard; - GLuint texture; - GLuint depth_buffer; - GLuint stencil_buffer; - GLuint color_buffer; + QGLSharedResourceGuardBase *fbo_guard; + QGLSharedResourceGuardBase *texture_guard; + QGLSharedResourceGuardBase *depth_buffer_guard; + QGLSharedResourceGuardBase *stencil_buffer_guard; + QGLSharedResourceGuardBase *color_buffer_guard; GLenum target; QSize size; QGLFramebufferObjectFormat format; @@ -152,7 +153,7 @@ public: mutable QPaintEngine *engine; QGLFBOGLPaintDevice glDevice; - inline GLuint fbo() const { return fbo_guard.id(); } + inline GLuint fbo() const { return fbo_guard ? fbo_guard->id() : 0; } }; |