summaryrefslogtreecommitdiffstats
path: root/tests/manual/custom-mesh-update-data-cpp/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/custom-mesh-update-data-cpp/main.cpp')
-rw-r--r--tests/manual/custom-mesh-update-data-cpp/main.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/tests/manual/custom-mesh-update-data-cpp/main.cpp b/tests/manual/custom-mesh-update-data-cpp/main.cpp
index 2b6b6b3cf..9f997658b 100644
--- a/tests/manual/custom-mesh-update-data-cpp/main.cpp
+++ b/tests/manual/custom-mesh-update-data-cpp/main.cpp
@@ -56,6 +56,9 @@
#include <Qt3DRender/QCameraLens>
#include <Qt3DCore/QTransform>
#include <Qt3DCore/QAspectEngine>
+#include <Qt3DCore/QGeometry>
+#include <Qt3DCore/QAttribute>
+#include <Qt3DCore/QBuffer>
#include <Qt3DInput/QInputAspect>
@@ -65,9 +68,6 @@
#include <Qt3DExtras/QPerVertexColorMaterial>
#include <Qt3DRender/QGeometryRenderer>
-#include <Qt3DRender/QGeometry>
-#include <Qt3DRender/QAttribute>
-#include <Qt3DRender/QBuffer>
#include <QPropertyAnimation>
#include <Qt3DExtras/qt3dwindow.h>
@@ -75,7 +75,7 @@
#include <qmath.h>
QByteArray vertexBufferData;
-Qt3DRender::QBuffer *vertexDataBuffer;
+Qt3DCore::QBuffer *vertexDataBuffer;
class TimerObject: public QObject {
Q_OBJECT
@@ -124,10 +124,10 @@ int main(int argc, char* argv[])
// Custom Mesh (TetraHedron)
Qt3DRender::QGeometryRenderer *customMeshRenderer = new Qt3DRender::QGeometryRenderer;
- Qt3DRender::QGeometry *customGeometry = new Qt3DRender::QGeometry(customMeshRenderer);
+ Qt3DCore::QGeometry *customGeometry = new Qt3DCore::QGeometry(customMeshRenderer);
- vertexDataBuffer = new Qt3DRender::QBuffer(customGeometry);
- Qt3DRender::QBuffer *indexDataBuffer = new Qt3DRender::QBuffer(customGeometry);
+ vertexDataBuffer = new Qt3DCore::QBuffer(customGeometry);
+ Qt3DCore::QBuffer *indexDataBuffer = new Qt3DCore::QBuffer(customGeometry);
// vec3 for position
// vec3 for colors
@@ -208,37 +208,37 @@ int main(int argc, char* argv[])
indexDataBuffer->setData(indexBufferData);
// Attributes
- Qt3DRender::QAttribute *positionAttribute = new Qt3DRender::QAttribute();
- positionAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *positionAttribute = new Qt3DCore::QAttribute();
+ positionAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
positionAttribute->setBuffer(vertexDataBuffer);
positionAttribute->setVertexSize(3);
positionAttribute->setByteOffset(0);
positionAttribute->setByteStride(9 * sizeof(float));
positionAttribute->setCount(4);
- positionAttribute->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
+ positionAttribute->setName(Qt3DCore::QAttribute::defaultPositionAttributeName());
- Qt3DRender::QAttribute *normalAttribute = new Qt3DRender::QAttribute();
- normalAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *normalAttribute = new Qt3DCore::QAttribute();
+ normalAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
normalAttribute->setBuffer(vertexDataBuffer);
normalAttribute->setVertexSize(3);
normalAttribute->setByteOffset(3 * sizeof(float));
normalAttribute->setByteStride(9 * sizeof(float));
normalAttribute->setCount(4);
- normalAttribute->setName(Qt3DRender::QAttribute::defaultNormalAttributeName());
+ normalAttribute->setName(Qt3DCore::QAttribute::defaultNormalAttributeName());
- Qt3DRender::QAttribute *colorAttribute = new Qt3DRender::QAttribute();
- colorAttribute->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
+ Qt3DCore::QAttribute *colorAttribute = new Qt3DCore::QAttribute();
+ colorAttribute->setAttributeType(Qt3DCore::QAttribute::VertexAttribute);
colorAttribute->setBuffer(vertexDataBuffer);
colorAttribute->setVertexSize(3);
colorAttribute->setByteOffset(6 * sizeof(float));
colorAttribute->setByteStride(9 * sizeof(float));
colorAttribute->setCount(4);
- colorAttribute->setName(Qt3DRender::QAttribute::defaultColorAttributeName());
+ colorAttribute->setName(Qt3DCore::QAttribute::defaultColorAttributeName());
- Qt3DRender::QAttribute *indexAttribute = new Qt3DRender::QAttribute();
- indexAttribute->setAttributeType(Qt3DRender::QAttribute::IndexAttribute);
+ Qt3DCore::QAttribute *indexAttribute = new Qt3DCore::QAttribute();
+ indexAttribute->setAttributeType(Qt3DCore::QAttribute::IndexAttribute);
indexAttribute->setBuffer(indexDataBuffer);
- indexAttribute->setVertexBaseType(Qt3DRender::QAttribute::UnsignedShort);
+ indexAttribute->setVertexBaseType(Qt3DCore::QAttribute::UnsignedShort);
indexAttribute->setVertexSize(1);
indexAttribute->setByteOffset(0);
indexAttribute->setByteStride(0);