Skip to content

Miscellanous

settes edited this page Dec 15, 2022 · 1 revision

Extensions

Since Vulkan is cross-platform, it don't understand what a "window" is, because different systems have different window definitions. So Vulkan uses extensions to add window functionality.

We can choose required extensions defining them manually in Vulkan, but GLFW has function to choose them for us.

GLFW (Graphics Library Framework)

It's originally designed to work for OpenGL, but updated to work with Vulkan. Allows cross-platform window creation and automatic interfacing with OpenGL/Vulkan.

Contains glfwGetRequiredInstanceExtensions function that identifies the required Vulkan extensions for the host system, that returns a list of them and then use it to set up Vulkan with the correct extensions.

Validation Layers

Vulkan's goal is to achieve the best possible performance, so it doesn't handle any kind of exception. If the app crashes, it doesn't report any error.

To enable error checking, Vulkan has some type of layers that enable different types of debugging and exception handling. This layers must be declared in the instance.

Layers are similar to extensions and are not built-in to the core Vulkan code. Must be acquired from third parties. Additionally, the reporting of validation errors is not a core Vulkan function and will require another extension to be applied.

You can check the avaible layers with vkEnumerateInstanceLayerProperties.

Clone this wiki locally