I think my suggestion https://bugreports.qt.io/browse/QTBUG-50720 (and attached commit on gerrit) will help solve your task with updating the subset of QBuffer.
I did it for 5.7 branch, but currently I use almost same code in 5.6. Regards, Oleg 12 мая 2016 г. 18:54 пользователь "Camden Mannett" <camden.mann...@gmail.com> написал: > 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 > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest