Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will there be a SDL2pp wrapper over Vulkan? #144

Open
froart opened this issue Aug 22, 2023 · 4 comments
Open

Will there be a SDL2pp wrapper over Vulkan? #144

froart opened this issue Aug 22, 2023 · 4 comments

Comments

@froart
Copy link

froart commented Aug 22, 2023

Hi. I see that SDL2 has a SDL_vulkan.h header, but I failed to find one in SDL2pp. Will there ever be such a wrapper? Thank you.

@AMDmi3
Copy link
Member

AMDmi3 commented Aug 22, 2023

As far as I can see, it only implies adding 3 methods for Window, which wrap SDL_Vulkan_GetInstanceExtensions, SDL_Vulkan_CreateSurface, SDL_Vulkan_GetDrawableSize, is this correct?

@froart
Copy link
Author

froart commented Aug 22, 2023

As far as I can see, it only implies adding 3 methods for Window, which wrap SDL_Vulkan_GetInstanceExtensions, SDL_Vulkan_CreateSurface, SDL_Vulkan_GetDrawableSize, is this correct?

I suppose. Or else, you need to do some ugly things like this:
vk::SurfaceKHR surface;
{
VkSurfaceKHR _surface;
SDL_Vulkan_CreateSurface( window.Get(), static_cast<VkInstance>(instance), &_surface );
surface = vk::SurfaceKHR( _surface );
}

@froart
Copy link
Author

froart commented Aug 23, 2023

As far as I can see, it only implies adding 3 methods for Window, which wrap SDL_Vulkan_GetInstanceExtensions, SDL_Vulkan_CreateSurface, SDL_Vulkan_GetDrawableSize, is this correct?

I have queried the SDL Wiki and it showed me more than three methods you mentioned:
SDL_Vulkan_CreateSurface
SDL_Vulkan_GetDrawableSize
SDL_Vulkan_GetInstanceExtensions
SDL_Vulkan_GetVkGetInstanceProcAddr
SDL_Vulkan_GetVkInstanceProcAddr
SDL_Vulkan_LoadLibrary
SDL_Vulkan_UnloadLibrary

@AMDmi3
Copy link
Member

AMDmi3 commented Aug 23, 2023

Yes, but there's no point in handling other methods in sdl2pp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants