From e4d94411fc8d955072f632fda923dc04a0986ea5 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 4 Apr 2016 17:15:26 -0300 Subject: VoronoiSplat: minor implementation changes. --- voronoisplat.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'voronoisplat.cpp') diff --git a/voronoisplat.cpp b/voronoisplat.cpp index 1b8e9f8..15bb9bd 100644 --- a/voronoisplat.cpp +++ b/voronoisplat.cpp @@ -14,6 +14,8 @@ static const float DEFAULT_ALPHA = 5.0f; static const float DEFAULT_BETA = 20.0f; +static const int SAMPLES = 128; + static int nextPow2(int n) { // TODO: check for overflows @@ -34,6 +36,7 @@ VoronoiSplat::VoronoiSplat(QQuickItem *parent) , m_valuesChanged(false) , m_colorScaleChanged(false) { + setFlag(QQuickItem::ItemHasContents); setTextureFollowsItemSize(false); } @@ -478,8 +481,8 @@ void VoronoiSplatRenderer::updateTransform() GLfloat ty = 2.0f * m_sy.offset() - 1.0f; // The transform matrix should be this (but transposed -- column major): - // [ sx 0.0f 0.0f -tx ] - // [ 0.0f sy 0.0f -ty ] + // [ sx 0.0f 0.0f tx ] + // [ 0.0f sy 0.0f ty ] // [ 0.0f 0.0f 0.0f 0.0f ] // [ 0.0f 0.0f 0.0f 1.0f ] m_transform[0][0] = sx; -- cgit v1.2.3