Update only part of dynamic data? #1125
-
Hello, let me explain the situation. I have a descriptor storage buffer, that have one vsg::Array assigned to it. Size of array is pretty large and updates very often. If data is changed in that buffer, all memory is copying to GPU. And because updating is done very fast, FPS is decreasing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There isn't presently an example that illustrates how to do it but it should be possible using proxy data objects that points to section of the large data. vsg::Array/Array2D/Array3D have support for using using another storage vsg::Data as the data storage and you can offset into this vsg::Data so address just a portion of it. Then you can create a vsg::BufferInfo that use the portion of the vsg::Array. These proxy data objects are lightweight as the don't store any data themselves so this extra wrapping really is just a mechanism for specifying the portion you want to work with. I hope this make sense. |
Beta Was this translation helpful? Give feedback.
There isn't presently an example that illustrates how to do it but it should be possible using proxy data objects that points to section of the large data.
vsg::Array/Array2D/Array3D have support for using using another storage vsg::Data as the data storage and you can offset into this vsg::Data so address just a portion of it. Then you can create a vsg::BufferInfo that use the portion of the vsg::Array.
These proxy data objects are lightweight as the don't store any data themselves so this extra wrapping really is just a mechanism for specifying the portion you want to work with.
I hope this make sense.