Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Qt3D-wip-newapi-Overview: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:Developing_with_Qt::Qt3D]] | [[Category:Developing_with_Qt::Qt3D]] | ||
[toc align_right="yes" depth="2"] | |||
= Qt3D Overview = | = Qt3D Overview = | ||
Line 31: | Line 32: | ||
== Entity == | == Entity == | ||
A subclass of Node. Entities are the only elements that are renderered and parsed during the traversing of the scene graph. | A subclass of Node. Entities are the only elements that are renderered and parsed during the traversing of the scene graph. | ||
Additional Component properties that are added to the Entity help define its behavior and role in the scene. | |||
== Components == | == Components == | ||
Line 41: | Line 43: | ||
= C++ and QML APIs = | = C++ and QML APIs = | ||
It will be possible to use Qt3D from C++ only (requiring no other Qt module dependency but core) as well as from QML. | It will be possible to use Qt3D from C++ only (requiring no other Qt module dependency but core) as well as from QML. | ||
The QML API requires the QtQml module and eventually the QtQuick2 module in case you want to use QQuick2 items in a Quick3D scene. | |||
Both APIs will allow to produce the same results as the frontend C++ and QML elements are only different layers of a common rendering backend. | Both APIs will allow to produce the same results as the frontend C++ and QML elements are only different layers of a common rendering backend. |
Revision as of 09:48, 25 February 2015
[toc align_right="yes" depth="2"]
Qt3D Overview
This page presents a brief description of the internals of the new Qt3D module.
Overall Architecture
Aspects
In an effort to keep the Qt3D module easily maintainable and future proof, a concept of submodules named aspects has been developed. The Qt3D core module loads one or more of those Aspects on startup. Each aspect traverses the scene and gathers up elements to be used for the rendering of the scene. For every frame, each aspect can send a list of jobs to be executed by a shared thread pool.
By default, a Renderer Aspect dedicated to rendering scenes using OpenGL 3 / OpenGL 2 / OpenGL ES 2 is bundled.
In the future, additional aspects will be developed for skeletal animations, physics simulation, fluids, 3d audio …
The SceneGraph
Very much like the QtQuick 2.0 scenegraph, Qt3D has its own scenegraph. It is composed of C++ or Qml elements that can be used to create a tree describing the scene to render. Each aspect can implement its own subset of elements.
The FrameGraph
The FrameGraph offers a way to specify the rendering pipeline to be used. It defines the viewports, the cameras, the techniques and rendering passes to be used during the rendering. Implementing a 3D stereo viewport with the FrameGraph should be really easy.
Node / Entity / Component Model
Node
A node in the Qt3D scenegraph. Contains supporting data but in itself a Node is not parsed or rendered.
Entity
A subclass of Node. Entities are the only elements that are renderered and parsed during the traversing of the scene graph. Additional Component properties that are added to the Entity help define its behavior and role in the scene.
Components
A subclass of Node which acts as a building block for an Entity. They are parsed only when either instantiated or referenced by a property in an Entity.
http://oi61.tinypic.com/1zdxijn.jpg
C++ and QML APIs
It will be possible to use Qt3D from C++ only (requiring no other Qt module dependency but core) as well as from QML. The QML API requires the QtQml module and eventually the QtQuick2 module in case you want to use QQuick2 items in a Quick3D scene.
Both APIs will allow to produce the same results as the frontend C++ and QML elements are only different layers of a common rendering backend.
Qt3D should work on any kind of device that has support for OpenGL 2 / OpenGL ES2 with VAO extensions. For better performances OpenGL 3.2 is recommended.