diff options
author | Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> | 2015-08-10 14:33:14 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> | 2015-08-20 09:49:18 +0000 |
commit | 3f4d7a755585f1b79c7e9675220b8210f10f358e (patch) | |
tree | 50e4e4faef56413bede418bcf495ca7fe41677ba /src/quick/scenegraph/qsgdefaultlayer_p.h | |
parent | 04f30db289225e700fe99c163f53f0dd7e920caf (diff) |
Add possibility to mirror ShaderEffectSource generated textures
Using textures generated by ShaderEffectSource items (or Item.layer)
with custom OpenGL code was non-intuitive due to mismatching coordinate
systems, so added a possibility to control the generated texture
orientation.
[ChangeLog][QtQuick][ShaderEffectSource] Added possibility to mirror
generated OpenGL texture.
Change-Id: I7c03d8b6fbfc43d69812c15d244200fb8e7c7bb9
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultlayer_p.h')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultlayer_p.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgdefaultlayer_p.h b/src/quick/scenegraph/qsgdefaultlayer_p.h index 0ba7109ef6..7baaed5f67 100644 --- a/src/quick/scenegraph/qsgdefaultlayer_p.h +++ b/src/quick/scenegraph/qsgdefaultlayer_p.h @@ -78,10 +78,18 @@ public: void setDevicePixelRatio(qreal ratio) Q_DECL_OVERRIDE { m_device_pixel_ratio = ratio; } + bool mirrorHorizontal() const { return bool(m_mirrorHorizontal); } + void setMirrorHorizontal(bool mirror) Q_DECL_OVERRIDE; + + bool mirrorVertical() const { return bool(m_mirrorVertical); } + void setMirrorVertical(bool mirror) Q_DECL_OVERRIDE; + void scheduleUpdate() Q_DECL_OVERRIDE; QImage toImage() const Q_DECL_OVERRIDE; + QRectF normalizedTextureSubRect() const Q_DECL_OVERRIDE; + public Q_SLOTS: void markDirtyTexture() Q_DECL_OVERRIDE; void invalidated() Q_DECL_OVERRIDE; @@ -115,6 +123,8 @@ private: uint m_multisamplingChecked : 1; uint m_multisampling : 1; uint m_grab : 1; + uint m_mirrorHorizontal : 1; + uint m_mirrorVertical : 1; }; #endif // QSGDEFAULTLAYER_P_H |