[Interest] [QT3D] Multiple vertex buffers per Qt3DRender::QGeometry
Camden Mannett
camden.mannett at gmail.com
Thu May 12 16:53:55 CEST 2016
On the Qt forums a couple of months ago someone posted a message regarding
trying to use multiple vertex Qt3DRender::QBuffers
per Qt3DRender::QGeometry (
https://forum.qt.io/topic/64770/implement-multiple-vertex-buffers-per-one-renderable-entity),
they pointed towards this mailing list but I can't find any entry on the
subject.
I'm currently trying to visualise FDTD data, which consists of a large
number of grid nodes, each with a static position and a rapidly changing
scalar pressure value. Naturally I created two vertex buffers, one
StaticDraw for the positions, and another DynamicDraw for the pressures. I
never understood why my pressure vertex never seems to be accessed, until I
read the above post.
So now for a workaround. I tried to create one large buffer with the
position data occupying the first 75%, and the scalar data the latter 25%.
I never got as far as trying it as there seems to be no way to update a
subset of the Qt3DRender::QBuffer, as Qt3DRender::QAbstractBuffer::data()
returns a copy of the data. So I would have to copy all the unchanging
position data to the GPU as well - which obviously woefully inefficient.
What is the way to do this? I can't find any examples that use buffer
subsets or multiple vertex buffers.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160512/c3c7dfd1/attachment.html>
More information about the Interest
mailing list