summaryrefslogtreecommitdiffstats
path: root/src/render/frontend/qspheremesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/frontend/qspheremesh.cpp')
-rw-r--r--src/render/frontend/qspheremesh.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/render/frontend/qspheremesh.cpp b/src/render/frontend/qspheremesh.cpp
index c69eba837..59b732a2b 100644
--- a/src/render/frontend/qspheremesh.cpp
+++ b/src/render/frontend/qspheremesh.cpp
@@ -198,17 +198,17 @@ MeshDataPtr QSphereMesh::createSphereMesh(double radius, int rings, int slices,
buf->setUsage(QOpenGLBuffer::StaticDraw);
buf->setData(bufferBytes);
- mesh->addAttribute(QStringLiteral("position"), AttributePtr(new Attribute(buf, GL_FLOAT_VEC3, nVerts, 0, stride)));
+ mesh->addAttribute(QAbstractMeshData::defaultPositionAttributeName(), AttributePtr(new Attribute(buf, GL_FLOAT_VEC3, nVerts, 0, stride)));
quint32 offset = sizeof(float) * 3;
- mesh->addAttribute(QStringLiteral("texcoord"), AttributePtr(new Attribute(buf, GL_FLOAT_VEC2, nVerts, offset, stride)));
+ mesh->addAttribute(QAbstractMeshData::defaultTextureCoordinateAttributeName(), AttributePtr(new Attribute(buf, GL_FLOAT_VEC2, nVerts, offset, stride)));
offset += sizeof(float) * 2;
- mesh->addAttribute(QStringLiteral("normal"), AttributePtr(new Attribute(buf, GL_FLOAT_VEC3, nVerts, offset, stride)));
+ mesh->addAttribute(QAbstractMeshData::defaultNormalAttributeName(), AttributePtr(new Attribute(buf, GL_FLOAT_VEC3, nVerts, offset, stride)));
offset += sizeof(float) * 3;
if (hasTangents) {
- mesh->addAttribute(QStringLiteral("tangent"), AttributePtr(new Attribute(buf, GL_FLOAT_VEC4, nVerts, offset, stride)));
+ mesh->addAttribute(QAbstractMeshData::defaultTangentAttributeName(), AttributePtr(new Attribute(buf, GL_FLOAT_VEC4, nVerts, offset, stride)));
offset += sizeof(float) * 4;
}
@@ -266,7 +266,7 @@ MeshDataPtr QSphereMesh::createSphereMesh(double radius, int rings, int slices,
indexBuffer->setData(indexBytes);
mesh->setIndexAttribute(AttributePtr(new Attribute(indexBuffer, GL_UNSIGNED_SHORT, indices, 0, 0)));
- mesh->computeBoundsFromAttribute(QStringLiteral("position"));
+ mesh->computeBoundsFromAttribute(QAbstractMeshData::defaultPositionAttributeName());
qCDebug(Render::Frontend) << "computed sphere bounds is:" << mesh->boundingBox();
return mesh;