summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/tessellation-modes
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2015-01-23 16:22:00 +0100
committerSean Harmer <sean.harmer@kdab.com>2015-08-07 00:11:31 +0000
commitc2f6f37699296557c5d79ae750e0ce91647de2ee (patch)
tree6c140186656c46d5e8584d48772f70e78d04806c /examples/qt3d/tessellation-modes
parentce69c98f6954ef2c8806bc44a457a58e4202d751 (diff)
New Buffer API Frontend Classes
- Switch QAbstractAttribute and QAbstractBuffer to QNode subclasses - Get rid of all shared pointer when dealing with these (needed to expose to QML and use the QObject ownership) - Introduce QGeometryRender, QGeometry, QAttributeProvider, QAttributeAggregator. A QMesh component now is: a QGeometryRenderer which specifies its QGeometry. The QGeometry refererences n attributes. Each attribute references a QAbstractBuffer. Change-Id: I49a10c11a605e5fe7c180af86a404f622e763f48 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples/qt3d/tessellation-modes')
-rw-r--r--examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp b/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp
index 630fa1061..c582ee2ec 100644
--- a/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp
+++ b/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp
@@ -70,13 +70,13 @@ public:
positionBytes.resize(size);
memcpy(positionBytes.data(), positionData, size);
- Qt3D::BufferPtr vertexBuffer(new Qt3D::Buffer(QOpenGLBuffer::VertexBuffer));
- vertexBuffer->setUsage(QOpenGLBuffer::StaticDraw);
+ Qt3D::QBuffer *vertexBuffer(new Qt3D::QBuffer(Qt3D::QBuffer::VertexBuffer));
+ vertexBuffer->setUsage(Qt3D::QBuffer::StaticDraw);
vertexBuffer->setData(positionBytes);
Qt3D::QMeshDataPtr mesh(new Qt3D::QMeshData(Qt3D::QMeshData::Patches));
mesh->addAttribute(Qt3D::QMeshData::defaultPositionAttributeName(),
- Qt3D::AttributePtr(new Qt3D::Attribute(vertexBuffer, GL_FLOAT_VEC3, nVerts)));
+ new Qt3D::QAttribute(vertexBuffer, GL_FLOAT_VEC3, nVerts));
mesh->setVerticesPerPatch(4);
return mesh;
}