aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/scenegraph
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-10-05 12:51:38 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-05 14:31:40 +0200
commit8058fd80b712c802c23c36812b3dec47dce15676 (patch)
treefccc301f0b1a34b5d5f68d978b704f6fa8171a84 /src/declarative/scenegraph
parent884c0f6bf0246c128e3b6786f00fe5de3f3f9f6e (diff)
Don't accidentally use atlas images in particle nodes
Change-Id: I3058d9262bbc32c873ba26e51b04668f89ed060a Reviewed-on: http://codereview.qt-project.org/6039 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/declarative/scenegraph')
-rw-r--r--src/declarative/scenegraph/util/qsgtexture_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/declarative/scenegraph/util/qsgtexture_p.h b/src/declarative/scenegraph/util/qsgtexture_p.h
index 460c0e86b7..f14508fd25 100644
--- a/src/declarative/scenegraph/util/qsgtexture_p.h
+++ b/src/declarative/scenegraph/util/qsgtexture_p.h
@@ -92,6 +92,12 @@ public:
virtual void bind();
+ static QSGPlainTexture *fromImage(const QImage &image) {
+ QSGPlainTexture *t = new QSGPlainTexture();
+ t->setImage(image);
+ return t;
+ }
+
protected:
QImage m_image;