diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-11-26 09:56:47 +0100 |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-11-26 12:05:22 +0100 |
commit | 32b8c1cd7042aadc02dc3770b25d794d673af44f (patch) | |
tree | 4245b6ce62245a2f178c290d975b75dd504fddee /src/opengl/qglframebufferobject_p.h | |
parent | 7643d1016a6b4776cf671bbc595ec83002d2cc4e (diff) |
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 58b4e9e973..373878030c 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; |