summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian de Bhal <julian.debhal@nokia.com>2009-10-12 01:06:48 (GMT)
committerJulian de Bhal <julian.debhal@nokia.com>2009-10-12 01:06:48 (GMT)
commit44e41d17baa7519f309b8ca10df26ec61d8c2fc7 (patch)
tree76a6c1e2d77c21cac920c65b3c2586d328f1fcee
parent81d0c27d35b62dea9fceae4a4677704f558b5762 (diff)
parentc1f1b004f7af4c9199e73b4b02bdb4b3aaf74ea8 (diff)
downloadQt-44e41d17baa7519f309b8ca10df26ec61d8c2fc7.zip
Qt-44e41d17baa7519f309b8ca10df26ec61d8c2fc7.tar.gz
Qt-44e41d17baa7519f309b8ca10df26ec61d8c2fc7.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
-rw-r--r--src/opengl/qglframebufferobject.cpp4
-rw-r--r--src/opengl/qglframebufferobject_p.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index 5585208..8fc95cf 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -451,6 +451,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
QT_CHECK_GLERROR();
valid = checkFramebufferStatus();
+ glBindTexture(target, 0);
color_buffer = 0;
} else {
@@ -819,7 +820,8 @@ QGLFramebufferObject::~QGLFramebufferObject()
if (isValid() && ctx) {
QGLShareContextScope scope(ctx);
- glDeleteTextures(1, &d->texture);
+ if (d->texture)
+ glDeleteTextures(1, &d->texture);
if (d->color_buffer)
glDeleteRenderbuffers(1, &d->color_buffer);
if (d->depth_stencil_buffer)
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index 055a752..9fe80b8 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -127,7 +127,7 @@ private:
class QGLFramebufferObjectPrivate
{
public:
- QGLFramebufferObjectPrivate() : fbo_guard(0), depth_stencil_buffer(0), valid(false), previous_fbo(0), engine(0) {}
+ QGLFramebufferObjectPrivate() : fbo_guard(0), texture(0), depth_stencil_buffer(0), color_buffer(0), valid(false), previous_fbo(0), engine(0) {}
~QGLFramebufferObjectPrivate() {}
void init(QGLFramebufferObject *q, const QSize& sz,