summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/3d-text/main.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-05-24 12:09:44 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-05-24 12:10:02 +0100
commit77d294db076dac19e8b549b445ffede9f7260c84 (patch)
tree828ee7a6862ec5c0bd24f97cb540625a2c647376 /examples/qt3d/3d-text/main.cpp
parent59f8fec8a41606b3185fe3a4e276978e3e1ed5ef (diff)
parent939b9b4b7591e8a421cf048a0a84ed3e75d81d21 (diff)
Merge branch 'dev' into wip/animationwip/animation
Diffstat (limited to 'examples/qt3d/3d-text/main.cpp')
-rw-r--r--examples/qt3d/3d-text/main.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/examples/qt3d/3d-text/main.cpp b/examples/qt3d/3d-text/main.cpp
index 40ae8b80a..17d749f94 100644
--- a/examples/qt3d/3d-text/main.cpp
+++ b/examples/qt3d/3d-text/main.cpp
@@ -51,8 +51,7 @@
#include <QCoreApplication>
#include <Qt3DCore/Qt3DCore>
#include <Qt3DExtras/Qt3DExtras>
-#include <qtext3dmesh.h>
-#include <qtext3dgeometry.h>
+#include <Qt3DExtras/QExtrudedTextMesh>
int main(int argc, char *argv[])
{
@@ -85,17 +84,15 @@ int main(int argc, char *argv[])
for (QString family : fonts)
{
auto *text = new Qt3DCore::QEntity(root);
- auto *textMesh = new Qt3DExtras::QText3DMesh();
- Qt3DExtras::QText3DGeometry *textGeometry = static_cast<Qt3DExtras::QText3DGeometry*>(textMesh->geometry());
+ auto *textMesh = new Qt3DExtras::QExtrudedTextMesh();
auto *textTransform = new Qt3DCore::QTransform();
QFont font(family, 32, -1, false);
textTransform->setTranslation(QVector3D(-2.45f, i * .5f, 0));
textTransform->setScale(.2f);
- textGeometry->setDepth(.45f);
- textGeometry->setFont(font);
- textGeometry->setEdgeSplitAngle(90.f * .15f);
- textGeometry->setText(QString(family));
+ textMesh->setDepth(.45f);
+ textMesh->setFont(font);
+ textMesh->setText(QString(family));
textMaterial->setDiffuse(QColor(111, 150, 255));
text->addComponent(textMaterial);