ShaderStorageBufferData QML Type (Uncreatable)
Base type for CPU-authored shader storage buffer content. More...
| Import Statement: | import QtQuick3D |
| Since: | Qt 6.13 |
| In C++: | QQuick3DShaderStorageBufferData |
Note: This is an uncreatable type. It cannot be instantiated in QML.
Detailed Description
ShaderStorageBufferData is the base type for providing application-generated (CPU-side) content for a ShaderStorageBuffer, analogous to how TextureData provides application-generated content for a Texture. It cannot be instantiated directly from QML; instead, subclass QQuick3DShaderStorageBufferData in C++, set the data with setBufferData() and register the subclass to QML. Once registered, it can be assigned to a ShaderStorageBuffer's bufferData property.
The QQuick3DShaderStorageBufferData::bufferDataDirty() signal is emitted whenever the data changes, so the ShaderStorageBuffer using it can pick up the new content (and, if its size changed, propagate that too).
See also ShaderStorageBuffer and TextureData.