Replies: 1 comment 1 reply
-
I use the function below:
So, you need to maintain a reference to your vsg::Viewer to be able to get the recordAndSubmitTasks. You also still need to mark the data as dirty or it won't transfer. Don't forget to remove the DYNAMIC_DATA setting or the buffer will still be added to the dynamic list and the transfer will happen twice. You can't directly transfer a vsg::Value, you need to transfer the BufferInfo or DescriptorBuffer that it was assigned to prior to calling compile(). I keep a reference to the Descriptor when building the pipeline
I build the pipeline manually, so I'm not sure how to keep the Descriptor reference if you are using the more automated methods. Note that you can't just construct a new BufferInfo each time you want to transfer because it has to be compiled to have the relevant GPU buffer information. Hope that helps, Roland |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Robert mentioned in another thread that using
dirty()
to mark data has changed is very wasteful for a large lists of objects, since it is adding the resource to a big list of objects to be queried. Quoting Robert: "assign the BufferInfo that holds the data to vsg::TransferTask each time you update the data ".So my question is how do you assign to vsg::TransferTasks in practice?
As an example, currently here is how I access and change of one my uniforms:
So, how do I would I add the
viewportValue
to the "TransferTask" explicitly instead of setting its property tovsg::DYNAMIC_DATA
and usingdirty()
?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions