I want to use vulkan with SDL2 but I am stuck at the surface creation stage, i cannot use vkCreateWin32SurfaceKHR extension function as well as VkWin32SurfaceCreateInfoKHR extension struct as they are undefined, while i don't have any issues using other extension elements like (vkGetPhysicalDeviceSurfaceSupportKHR , etc ..), does the surface extension needs a separate header file? how can i get it to work?
the preprocessor directives i use are as follows
#include <vulkan\vulkan.h>
#include <SDL.h>
#include <stdio.h>
#include <iostream>
#include <vector>
#include <exception>
#define VK_USE_PLATFORM_WIN32_KHR
Please note that i have used Vulkan with glfw without having any program this is my second attempt of running vulkan, so i don't think i have any driver support issue.
Put the #define VK_USE_PLATFORM_WIN32_KHR
before you #include <vulkan\vulkan.h>
then you can grab the native info you need from SDL_GetWindowWMInfo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With