Game Programming using Qt 5 Beginner's Guide - Second Edition
by Pavel Strakhov, Witold Wysota, Lorenz Haas
Working with Qt 3D using C++
While QML is a powerful and convenient way of using Qt 3D, sometimes you may have reasons to prefer C++ over QML. For example, if your project has a large C++ codebase or your team is not familiar with JavaScript, sticking with C++ might be the right solution. If you want to extend a Qt 3D class with your custom implementation, you'll have to use the C++ approach. Additionally, if you deal with large amounts of objects, processing them in C++ may be noticeably faster than doing that in QML. Qt allows you to choose between C++ and QML freely.
The QML API of Qt 3D for the most part consists of C++ classes exposed without many changes. That means that most of the code you've seen in this chapter so far can be transparently ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access