diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-08-03 10:33:57 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2015-08-07 09:39:15 +0000 |
commit | b26337deaaede9bb58253a2f2051d007d6e220bd (patch) | |
tree | 48ec7728ea00d4640514138074750b8e270140e4 | |
parent | a4461dc5cccd395ee0d277182a15b7b17bc552a7 (diff) |
QAttribute: Add default attribute names getter
Change-Id: I4b5a45c4486cd9210f1a3f81683508c5c48b82ef
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r-- | src/render/io/qattribute.cpp | 25 | ||||
-rw-r--r-- | src/render/io/qattribute.h | 6 |
2 files changed, 31 insertions, 0 deletions
diff --git a/src/render/io/qattribute.cpp b/src/render/io/qattribute.cpp index 814ec0aa8..07612ef71 100644 --- a/src/render/io/qattribute.cpp +++ b/src/render/io/qattribute.cpp @@ -290,6 +290,31 @@ QBuffer *QAttribute::buffer() const return static_cast<QBuffer *>(QAbstractAttribute::buffer()); } +QString QAttribute::defaultPositionAttributeName() +{ + return QStringLiteral("vertexPosition"); +} + +QString QAttribute::defaultNormalAttributeName() +{ + return QStringLiteral("vertexNormal"); +} + +QString QAttribute::defaultColorAttributeName() +{ + return QStringLiteral("vertexColor"); +} + +QString QAttribute::defaultTextureCoordinateAttributeName() +{ + return QStringLiteral("vertexTexCoord"); +} + +QString QAttribute::defaultTangentAttributeName() +{ + return QStringLiteral("vertexTangent"); +} + } // Qt3D QT_END_NAMESPACE diff --git a/src/render/io/qattribute.h b/src/render/io/qattribute.h index 6d312dd30..39948101c 100644 --- a/src/render/io/qattribute.h +++ b/src/render/io/qattribute.h @@ -66,6 +66,12 @@ public: QBuffer *buffer() const; + static QString defaultPositionAttributeName(); + static QString defaultNormalAttributeName(); + static QString defaultColorAttributeName(); + static QString defaultTextureCoordinateAttributeName(); + static QString defaultTangentAttributeName(); + protected: void copy(const QNode *ref) Q_DECL_OVERRIDE; |