![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QSGVertexColorMaterial class provides a convenient way of rendering per-vertex colored geometry in the scene graph. More...
#include <qsgvertexcolormaterial.h>
Public Member Functions | |
QSGVertexColorMaterial () | |
Creates a new vertex color material. | |
int | compare (const QSGMaterial *other) const override |
int QSGVertexColorMaterial::compare() const | |
![]() | |
QSGMaterial () | |
virtual | ~QSGMaterial () |
QSGMaterial::Flags | flags () const |
Returns the material's flags. | |
void | setFlag (Flags flags, bool on=true) |
Sets the flags flags on this material if on is true; otherwise clears the attribute. | |
int | viewCount () const |
Protected Member Functions | |
QSGMaterialType * | type () const override |
QSGMaterialShader * | createShader (QSGRendererInterface::RenderMode renderMode) const override |
Additional Inherited Members | |
![]() | |
enum | Flag { Blending = 0x0001 , RequiresDeterminant = 0x0002 , RequiresFullMatrixExceptTranslate = 0x0004 | RequiresDeterminant , RequiresFullMatrix = 0x0008 | RequiresFullMatrixExceptTranslate , NoBatching = 0x0010 , MultiView2 = 0x10000 , MultiView3 = 0x20000 , MultiView4 = 0x40000 } |
\value Blending Set this flag to true if the material requires blending to be enabled during rendering. More... | |
The QSGVertexColorMaterial class provides a convenient way of rendering per-vertex colored geometry in the scene graph.
\inmodule QtQuick
The vertex color material will give each vertex in a geometry a color. Pixels between vertices will be linearly interpolated. The colors can contain transparency.
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.
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.
Definition at line 11 of file qsgvertexcolormaterial.h.
QSGVertexColorMaterial::QSGVertexColorMaterial | ( | ) |
Creates a new vertex color material.
Definition at line 80 of file qsgvertexcolormaterial.cpp.
|
overridevirtual |
int QSGVertexColorMaterial::compare() const
As the vertex color material has all its state in the vertex attributes, all materials will be equal.
Reimplemented from QSGMaterial.
Definition at line 95 of file qsgvertexcolormaterial.cpp.
|
overrideprotectedvirtual |
Implements QSGMaterial.
Definition at line 116 of file qsgvertexcolormaterial.cpp.
|
overrideprotectedvirtual |
Implements QSGMaterial.
Definition at line 104 of file qsgvertexcolormaterial.cpp.