diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-11-26 08:56:47 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-11-26 11:05:22 (GMT) |
commit | 32b8c1cd7042aadc02dc3770b25d794d673af44f (patch) | |
tree | 4245b6ce62245a2f178c290d975b75dd504fddee /src/opengl/qglframebufferobject_p.h | |
parent | 7643d1016a6b4776cf671bbc595ec83002d2cc4e (diff) | |
download | Qt-32b8c1cd7042aadc02dc3770b25d794d673af44f.zip Qt-32b8c1cd7042aadc02dc3770b25d794d673af44f.tar.gz Qt-32b8c1cd7042aadc02dc3770b25d794d673af44f.tar.bz2 |
Added mipmap property to QGLFramebufferObjectFormat.
If the mipmap property is set, QGLFramebufferObject will
allocate memory for mipmap levels.
Reviewed-by: Gunnar
Diffstat (limited to 'src/opengl/qglframebufferobject_p.h')
-rw-r--r-- | src/opengl/qglframebufferobject_p.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h index 58b4e9e..3738780 100644 --- a/src/opengl/qglframebufferobject_p.h +++ b/src/opengl/qglframebufferobject_p.h @@ -77,7 +77,8 @@ public: samples(0), attachment(QGLFramebufferObject::NoAttachment), target(GL_TEXTURE_2D), - internal_format(DEFAULT_FORMAT) + internal_format(DEFAULT_FORMAT), + mipmap(false) { } QGLFramebufferObjectFormatPrivate @@ -86,7 +87,8 @@ public: samples(other->samples), attachment(other->attachment), target(other->target), - internal_format(other->internal_format) + internal_format(other->internal_format), + mipmap(other->mipmap) { } bool equals(const QGLFramebufferObjectFormatPrivate *other) @@ -94,7 +96,8 @@ public: return samples == other->samples && attachment == other->attachment && target == other->target && - internal_format == other->internal_format; + internal_format == other->internal_format && + mipmap == other->mipmap; } QAtomicInt ref; @@ -102,6 +105,7 @@ public: QGLFramebufferObject::Attachment attachment; GLenum target; GLenum internal_format; + uint mipmap : 1; }; class QGLFBOGLPaintDevice : public QGLPaintDevice @@ -132,7 +136,8 @@ public: void init(QGLFramebufferObject *q, const QSize& sz, QGLFramebufferObject::Attachment attachment, - GLenum internal_format, GLenum texture_target, GLint samples = 0); + GLenum internal_format, GLenum texture_target, + GLint samples = 0, bool mipmap = false); bool checkFramebufferStatus() const; QGLSharedResourceGuard fbo_guard; GLuint texture; |