aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgbasicinternalrectanglenode.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2016-10-07 09:57:01 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2016-10-12 09:57:43 +0000
commit6df6c10e1af827d06a387e7422176dd310cf83be (patch)
tree4c343d4f30677147af5a8c64e2fdfc107c7f431f /src/quick/scenegraph/qsgbasicinternalrectanglenode.cpp
parent51a7d0331ed430d0f81d02c1b690bd12da8fdb3b (diff)
Fix enums in QSGGeometry
Minor fixes based on comments from the 5.8 API changes review: Revert to using Qt-style enum values (POSITION -> PositionAttribute). Use ByteType, FloatType, etc. instead of TypeByte, TypeFloat, ... Add comments about magic GL values. Add missing docs for Attribute::createWithAttributeType(). Change-Id: I1b8242efd3936f000ce8df6c11ff9ab7affb5713 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgbasicinternalrectanglenode.cpp')
-rw-r--r--src/quick/scenegraph/qsgbasicinternalrectanglenode.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/scenegraph/qsgbasicinternalrectanglenode.cpp b/src/quick/scenegraph/qsgbasicinternalrectanglenode.cpp
index 8fc850b60c..df124cce35 100644
--- a/src/quick/scenegraph/qsgbasicinternalrectanglenode.cpp
+++ b/src/quick/scenegraph/qsgbasicinternalrectanglenode.cpp
@@ -87,9 +87,9 @@ namespace
const QSGGeometry::AttributeSet &smoothAttributeSet()
{
static QSGGeometry::Attribute data[] = {
- QSGGeometry::Attribute::createWithSemantic(0, 2, QSGGeometry::TypeFloat, QSGGeometry::Attribute::POSITION),
- QSGGeometry::Attribute::createWithSemantic(1, 4, QSGGeometry::TypeUnsignedByte, QSGGeometry::Attribute::COLOR),
- QSGGeometry::Attribute::createWithSemantic(2, 2, QSGGeometry::TypeFloat, QSGGeometry::Attribute::TEXCOORD)
+ QSGGeometry::Attribute::createWithAttributeType(0, 2, QSGGeometry::FloatType, QSGGeometry::PositionAttribute),
+ QSGGeometry::Attribute::createWithAttributeType(1, 4, QSGGeometry::UnsignedByteType, QSGGeometry::ColorAttribute),
+ QSGGeometry::Attribute::createWithAttributeType(2, 2, QSGGeometry::FloatType, QSGGeometry::TexCoordAttribute)
};
static QSGGeometry::AttributeSet attrs = { 3, sizeof(SmoothVertex), data };
return attrs;