Showing posts with label GLFW. Show all posts
Showing posts with label GLFW. Show all posts

Monday, October 18, 2021

Vulcan, Go, and A Triangle, Part 5

In this part I am going to create an object for keeping track of our physical device, enumerate over physical devices, and select a physical device for our application.

I deviate from the vulkan tutorial here a little bit because I wanted to encapsulate physical device related functionality in a specific class. This will become more useful later when dealing with memory buffers. I also create the surface in a different order.

This part relates to Drawing a triangle / Setup / Physical devices and queue families in the original tutorial.

Sunday, October 17, 2021

Vulcan, Go, and A Triangle, Part 4

In this part of the tutorial, I'm going to inspect what extensions and layers are available for an instance. The call to vk.CreateInstance can result in vk.ErrorLayerNotPresent or vk.ErrorExtensionNotPresent according to the Vulkan spec. By inspecting the available options and checking if my required options are supported, I can provide a more debuggable error response.

Following the Vulkan Tutorial, I implemented the necessary functions to enumerate over available layers and extensions before calling CreateInstance. This part relates to Drawing a triangle / Setup / Instance / Checking for extension support in the original tutorial.

Saturday, October 16, 2021

Vulcan, Go, and A Triangle, Part 2

In the last part, we started with adding dependencies, helper functions and the basic skeleton. In this part we are going to start expanding on setup(), cleanup(), and mainLoop().

Each part going forward will end with code that should build and run, although in many cases there will not be a visible output.

Part 2 roughly translates to the second half of Drawing a triangle / Setup / Base code.