diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-08-02 15:18:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-12 17:03:15 +0200 |
commit | 3ed9f1f4b6f9e17943fe8f756e1ff9d6ba2b6479 (patch) | |
tree | d9998b8110eecee82e1c6de3b585d72760f13bff /src/quick/scenegraph | |
parent | 0bf62bd47bfda33305153a808619550e6a5b896f (diff) |
Public API for creating atlas textures, when available.
Atlas textures are currently only used when scenegraph is
combined with the customcontext from the playground/scenegraph
module.
Change-Id: I42f62abdad42e97cc1dcdc05bfb16ecf2839dc0e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/qsgcontext.cpp | 7 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgcontext_p.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp index a142a23c67..cb0a6d5afc 100644 --- a/src/quick/scenegraph/qsgcontext.cpp +++ b/src/quick/scenegraph/qsgcontext.cpp @@ -447,6 +447,13 @@ QSGTexture *QSGContext::createTexture(const QImage &image) const return t; } +QSGTexture *QSGContext::createTextureNoAtlas(const QImage &image) const +{ + QSGPlainTexture *t = new QSGPlainTexture(); + if (!image.isNull()) + t->setImage(image); + return t; +} /*! diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h index bbc42674c6..3d5fc00de3 100644 --- a/src/quick/scenegraph/qsgcontext_p.h +++ b/src/quick/scenegraph/qsgcontext_p.h @@ -103,7 +103,8 @@ public: virtual QSGGlyphNode *createNativeGlyphNode(); virtual QSGRenderer *createRenderer(); - virtual QSGTexture *createTexture(const QImage &image = QImage()) const; + virtual QSGTexture *createTexture(const QImage &image) const; + virtual QSGTexture *createTextureNoAtlas(const QImage &image) const; virtual QSize minimumFBOSize() const; virtual QSharedPointer<QSGDepthStencilBuffer> depthStencilBufferForFbo(QOpenGLFramebufferObject *fbo); QSGDepthStencilBufferManager *depthStencilBufferManager(); |