Nuklear/demo/glfw_vulkan/src
Antti Keränen 6566d9075d
Improve Vulkan demo (#717)
* demo: fix errors and warnings in GLFW Vulkan demo

* demo: improve resize handling in GLFW Vulkan demo

On my machine (x86_64 Linux, Wayland) VK_SUBOPTIMAL or
VK_OUT_OF_DATE_KHR were never returned so the resizing of the swapchain
never happened.

Fix by using GLFW's resize callback to detect a window resize and a
swapchain recreation. Vulkan tutorial uses the same approach.

fb_scale was never used in the Vulkan backend, so it was removed.

* demo: fix copy&paste typo in GLFW Vulkan demo

* demo: sync nuklear_glfw_vulkan.in.h with nuklear_glfw_vulkan.h

Over time people have not been noticing that the expected workflow is to
build nuklear_glfw_vulkan.h from nuklear_glfw_vulkan.in.h
2024-10-19 04:04:28 -04:00
..
nuklearshaders add vulkan demo 2023-10-22 12:03:27 +02:00
Makefile add vulkan demo 2023-10-22 12:03:27 +02:00
nuklear_glfw_vulkan.in.h Improve Vulkan demo (#717) 2024-10-19 04:04:28 -04:00
README.md add vulkan demo 2023-10-22 12:03:27 +02:00

Contrary to OpenGL Vulkan needs precompiled shaders in the SPIR-V format which makes it a bit more difficult to inline the shadercode.

After executing make the result should be a self contained nuklear_glfw_vulkan.h. Copy the result file to the parent directory and the "release" should be done.

You will need to have xxd, glslc and awk installed for this.