I'm trying to create a Vulkan Surface for drawing to a winit window using Surface::from_hwnd() from the vulkano crate.
Is there a better/preferred way to do this?
As a sidenote: I see that docs.rs only shows the unix submodule under os, presumably because the docs are built on a unix-like machine?
To create vulkan surfaces, there is the vulkano-win crate that bridges vulkano and winit, and it apparently works without needing this addition. (I know nothing about vulkan or vulkano though.)
Regarding docs.rs, the top bar has a drop-down menu for changing the platform, it just displays the linux one by default.
I'll take a look! Thanks for both answers 馃憤
I'm closing this issue. Feel free to reopen if needed.
@vberger I want to use ash myself and want to allow window creation on windows - should I use win32 then or might this still be added?
Better ask @Osspial, I know pretty much nothing about win32.
@nifker I suppose there wouldn't be much harm to adding this, but it's already possible to do this externally to Winit via GetWindowLong(hwnd, GWL_HINSTANCE), so I don't think it's strictly necessary for us to expose. I'd accept a PR implementing it, but I don't want to write such a PR myself.
@Osspial Ive also seen using this function to get HINSTANCE: https://docs.rs/winapi/0.3.8/winapi/um/libloaderapi/fn.GetModuleHandleW.html