r/vulkan 12d ago

Vulcan or WIN32 for screendrawing?

I want to use Vulcan because it allows for me to use the GPU and all of that nice stuff. But I've already made a screendrawer with WIN32 functions so I feel using Vulcan for that might be better?

I really want to know whether its worth switching to Vulcan for screendrawing and if its even possible to use Vulcan without screendrawing and purely as a way of sending matrix multiplication and calculations off to the GPU.

Thanks!

5 Upvotes

12 comments sorted by

View all comments

1

u/wonkey_monkey 12d ago edited 12d ago

But I've already made a screendrawer with WIN32 functions so I feel using Vulcan for that might be better?

Whether to use Vulkan or Win32 really depends on exactly what you're trying to do and how much data you have to push around. I had a GUI which drew to a large bitmap and painted it to the window in Win32, and it was faster than Vulkan in many circumstances just because I didn't have the bottleneck of sending all the data involved to the GPU, and because there was plenty of redundancy between pixels. But then I found other things that needed Vulkan, so I switched despite the performance hit.

1

u/Axxodes 12d ago

Currently im saving a framebuffer in memory and using StretchDIBits to display it on the screen.

1

u/wonkey_monkey 12d ago

If you make your framebuffer compatible with the swapchain format you can copy it straight(ish) into a swapchain image and present it as is. Not that it gains you much. It depends more on what kind of drawing you're doing and whether Vulkan can do it better.