KhronosGroup / Vulkan-Hpp

Open-Source Vulkan C++ API
Apache License 2.0
3.08k stars 304 forks source link

RAII with Vulkan Memory Allocator (VMA)? #1933

Closed justinblaber closed 1 month ago

justinblaber commented 1 month ago

Was wondering if there were any examples or general guidelines/workflow for integrating VMA with the RAII header. Couldn't find anything in the RAII examples.

asuessenbach commented 1 month ago

As there's nobody jumping in here, it seems nobody regularly visiting this repo has experience with that. Do you expect any issues or pitfalls? Or do you have specific problems to be resolved?

justinblaber commented 1 month ago

No, was thinking about using it with vulkan RAII but havent seen any examples so was wondering if any are out there already, but I'll go ahead and close. If I get around to it i'll try to post a working example at some point.

BohdanCodes commented 1 month ago

@justinblaber, I saw your issue a few days ago and was about to comment but didn't have the time. Just like you, I was looking for a high-quality example of integrating vulkan_raii with vma. Just like you, I eventually decided to write it myself. I'm willing to open-source it under the same license as this project. I'll put it in my repository by the end of the week if you're interested. It borrows the idea from the DrawCube example and some things for the render loop inspired by the RayTracing example. I also implemented window resizing. I had to rewrite various utility functions and classes to include the goodness provided by the Vulkan memory allocation library. I'd highly appreciate it if you reviewed my code.

Remember that the Vulkan-Hpp repository is more about the C++ bindings for the Vulkan API and less about Vulkan samples (nevertheless, they are very well-written). And since the development of VMA isn't directly overseen by Khronos, there may be resistance to putting such examples in this project. Because then you welcome the entire ecosystem of Vulkan-related projects (like volk, vk-bootstrap, and many others) that evolve independently, and the maintainers would have to favor only a subset of them (not to mention the effort to keep them up-to-date). Let us know your thoughts on this, @asuessenbach.

BohdanCodes commented 1 month ago

If anyone finds this thread in the future, the repository will be called InteractiveVulkan.

justinblaber commented 1 month ago

If anyone finds this thread in the future, the repository will be called InteractiveVulkan.

This sounds good to me I'll definitely take a look. Thanks for making this available.