parawave / vulkan-cpp-library

Parawave Vulkan C++ is a collection of JUCE modules that extend the application framework by adding the LunarG Vulkan SDK.
https://parawave-audio.com/vulkan-cpp-library
Other
25 stars 2 forks source link

MacOS and Linux support #1

Open 0xchase opened 3 years ago

0xchase commented 3 years ago

I'm working on a cross platform JUCE VST, for which vulkan integration would be useful, and I was hoping you could help me get and idea of how much effort it would take me to get this library working cross-platform and robust enough for production.

How much effort do you think it would take to add MacOS or Linux support to this library? I see the current repository is ~12000 lines of code. Would extending the support double this? Or could much of the code be reused? How long did it take you to develop the current library?

Thanks

parawave commented 3 years ago

The platform specific code is actually not that much. https://github.com/parawave/vulkan-cpp-library/tree/main/modules/pw_vulkan/native

See - Windows specific code is only in pw_Vulkan_win32.h The code has to implement VulkanNativeSurface. A custom interface. It essentially handles the creation of a native window (in Windows HWND) and is necessary for the Vulkan swapchain surface creation.

Most initialisation code for the windowing can be reused from the juce_opengl module: https://github.com/juce-framework/JUCE/tree/master/modules/juce_opengl/native

The rest does not need to be changed. If you have previous experience with windowing for each platform, maybe two weeks of work? Depends.

The problem is, the library is not widely tested. Even if the platform code is added, there are remaining untested issues, even on Windows. See https://forum.juce.com/t/vulkan-modules-for-juce-0-5-0-beta-now-on-github/45978/13