In the develop branch i started to create vulkan implementation - with and without FPL.
On win32 it works, i have a blue cleared screen and re-create the swap-chain on resize.
On X11 it works too, but it crashes when i destroy the X11 window :-(
From looking around other implementations, there is one important note - which applies to opengl as well.
Unloading the OpenGL library or Vulkan library while we havent XCloseDisplay(), may crash the application on termination.
To solve this, we have to load the library before creating any window and release the library after the window system has been closed.
NOTE: In the current fpl_vulkan.c i tried that and it still crashes the application :-( Not sure why, in GLFW/SDL they load/unload the library before the window is being created and after the window has been shut down. Weird problem.
I have to create a separate c file, without any FPL code - to identify that. Bad i have removed my old playgrounds from the early days :-(
In the develop branch i started to create vulkan implementation - with and without FPL. On win32 it works, i have a blue cleared screen and re-create the swap-chain on resize. On X11 it works too, but it crashes when i destroy the X11 window :-(
I looked at the official spec and i found something, which may help? https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/html/vkspec.html#platformCreateSurface_xlib -> XInitThreads()
From looking around other implementations, there is one important note - which applies to opengl as well.
NOTE: In the current fpl_vulkan.c i tried that and it still crashes the application :-( Not sure why, in GLFW/SDL they load/unload the library before the window is being created and after the window has been shut down. Weird problem.
I have to create a separate c file, without any FPL code - to identify that. Bad i have removed my old playgrounds from the early days :-(