How to reset the size of textureData #1206
Replies: 2 comments
-
In Vulkan and with it VSG the vk/vsg::Image has a fixed size set on allocation. If you leave the VSG to set these up it'll use the source vsg::Data size as a guide for the initial size. vsg::Data, used to store the source data, also have constant size, again the resources they are associated with on the GPU so the VSG side is also fixed size. To change size of the texture data through to the GPU resources you'll need to allocate new vsg::Data object and associated vsg::ImageView/Image. I don't recall of the top of my head whether you'd need to use new DescriptorImage as well. There should be no need to create new StateGroup as you can just assign different BindDescriptorSet or change the BindDescriptorSet. However, it might be that changing texture size is not required and there could be a cleaner way of doing it, but can't advise on this as you haven't provided any details about why you are wanting to change texture size, |
Beta Was this translation helpful? Give feedback.
-
Thank you very much! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there!
I set the texture map through vsg::BindDescriptorSet. When I want to change a TextureData, the two TextureData have different sizes. I don't know what to do.
My current approach is to generate a new StateGroup with a new texture. Is this the right way?
Beta Was this translation helpful? Give feedback.
All reactions