Using Qt3D to visualise 2D data
-
Hi,
We have an application that processes data in real time and visualises the results, using QML and OpenGL. We're using a custom library that exposes OpenGL into QML in a declarative way. For example, there's aTexture
element to define textures (type, height, width etc), and aGraphicsProgram
to run vertex/geometry/fragment shaders and display the results in anItem
-like way.The current process is that data is generated on the CPU in C++, that gets put into a 2D texture array on the GPU. A visualisation component takes the 2D texture array (it's 3D because heightwidthlayers) and processes it down to 2D (i.e. it removes a dimension). The result is displayed in the UI, where we have some QML items that overlay it (e.g. crosshairs).
Is it possible to use Qt3D or QtQuick3D to achieve something similar, is there a different part of QML/QtQuick I should be looking at? I'm struggling to find out if it's possible, as the data doesn't need to be shown in a 3D space, or have lighting applied to it, or have a projection applied to it (a camera), which is what Qt3D and QtQuick3D assume.
I think, in summary, what we want to be able to do is have QML allow us to define textures, add data to the texture at run-time, and be able to run a shader pipeline into an
Item
.