Jump to content

Resizable Vulkan Window

Josh

169 views

When a window in Vulkan resizes you have to manually delete the about a dozen objects and then recreate them with the new size. It's unbelievably complicated. They've pushed all the driver complexity onto the application, in an effort to simplify the job of writing drivers. I can see the advantage to this, because OpenGL drivers in the past were always inconsistent, but it is still shocking how many little details they expose in Vulkan. Just resizing a window and swapping the screen buffer involves fences, semaphores, and all kinds of issues.

So it is with great pride that I present my RESIZABLE VULKAN WINDOW OF AWESOME POWER!

vktest2.zip

Now I will drink CHOSEN ONE ENERGY DRINK!

Image1.thumb.jpg.34117479b5684f67dd4532d2fc5b2bc7.jpg

In spite of its issues, I kind of like Vulkan, and I don't think it will take long to get the renderer running completely on this new API. I guess Nvidia's raytracing extensions can be used with VK pretty easily too, so that will be interesting in the future.

The next step is to get multiple shared contexts working.

  • Like 3
  • Upvote 1


3 Comments


Recommended Comments

Gave this a go, really neat. Minus the artifacting when you make the window bigger from a small size, works really well. Really stoked about the Vulkan implementation, and I'm sure this will pay off. :)

Share this comment


Link to comment
12 minutes ago, reepblue said:

Gave this a go, really neat. Minus the artifacting when you make the window bigger from a small size, works really well. Really stoked about the Vulkan implementation, and I'm sure this will pay off. :)

My code does not currently perform renders during a Windows event loop, so the window contents are stuck. I noticed that on Intel graphics it keeps the contents of the window exactly the same, and on Nvidia graphics it rescales the contents of the window as you resize it.

I have vertex buffers working now, and it's probably a bit simpler than OpenGL VBOs, which were really a nightmare to work with.

I think most of Vulkan is code you write once and then hide it away in your own classes.

This works out very nicely because my new renderer moves all the calculations into shader code, and all that GLSL code will work with Vulkan. I think the new renderer will actually be done pretty quickly.

Share this comment


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...