aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-08-08 19:49:11 +0200
committerGunnar Sletta <gunnar.sletta@jollamobile.com>2014-08-17 14:56:54 +0200
commit0fadb710e5639dac9f17d6655eb9edeaadbcbc33 (patch)
tree16774f087aa78596ba6e83418483a40528f2dd50 /src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
parent2f494803578475732dcffcd12fe5ba3b4b1c521b (diff)
Doc note about premultiplied alpha
Task-number: QTBUG-40677 Change-Id: I43b8cb4f3af8c62f67353197ffadf571a675eab7 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/quick/scenegraph/util/qsgvertexcolormaterial.cpp')
-rw-r--r--src/quick/scenegraph/util/qsgvertexcolormaterial.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
index ef2455f702..42510e5c27 100644
--- a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
+++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp
@@ -107,9 +107,12 @@ void QSGVertexColorMaterialShader::initialize()
The geometry to be rendered with vertex color must have the following layout. Attribute
position 0 must contain vertices. Attribute position 1 must contain colors, a tuple of
4 values with RGBA layout. Both floats in the range of 0 to 1 and unsigned bytes in
- the range 0 to 255 are valid for the color values. The
- QSGGeometry::defaultAttributes_ColoredPoint2D() constructs an attribute set
- compatible with this material.
+ the range 0 to 255 are valid for the color values.
+
+ \note The rendering pipeline expects pixels with premultiplied alpha.
+
+ QSGGeometry::defaultAttributes_ColoredPoint2D() can be used to construct an attribute
+ set that is compatible with this material.
The vertex color material respects both current opacity and current matrix when
updating it's rendering state.