summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-08-25 16:53:05 +0200
committerLaszlo Agocs <laszlo.agocs@digia.com>2014-08-27 10:40:07 +0200
commit63f48d00aaa51bc892d6381b43d57a6bc55afced (patch)
treec321ad38bbbf7153ded4144a6783c6fed8738213
parent8e96e73ebce9e0e7bd9c9f55eb545c442fe93a70 (diff)
Initialize textureId in platform backing store
Setting it initially to 0 is very important, otherwise we will do a glDeleteTextures with the undefined value. The result sometimes goes unnoticed and sometimes causes bizarre issues: For example in the 'textures' example one face of one cube out of the six did go blank from time to time since the corresponding texture was deleted by the backingstore. Change-Id: Iebf68e20b2af426c979980d8bc4449db2b98f2f0 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp
index 5b6c4bb83d..0fe883cf2b 100644
--- a/src/gui/painting/qplatformbackingstore.cpp
+++ b/src/gui/painting/qplatformbackingstore.cpp
@@ -62,6 +62,7 @@ public:
QPlatformBackingStorePrivate(QWindow *w)
: window(w)
#ifndef QT_NO_OPENGL
+ , textureId(0)
, blitter(0)
#endif
{