Skip to content

Commit 7d012b3

Browse files
Merge pull request #450 from Hedgehogsoft/main
remove VKInstance instance from getPresentation and fix windows support
2 parents 37e4af7 + 185084f commit 7d012b3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

RGFW.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2705,7 +2705,7 @@ RGFWDEF VkResult RGFW_window_createSurface_Vulkan(RGFW_window* win, VkInstance i
27052705
* @param queueFamilyIndex The index of the queue family to query for presentation support.
27062706
* @return RGFW_TRUE if presentation is supported, RGFW_FALSE otherwise.
27072707
*/
2708-
RGFWDEF RGFW_bool RGFW_getPresentationSupport_Vulkan(VkInstance instance, VkPhysicalDevice physicalDevice, u32 queueFamilyIndex);
2708+
RGFWDEF RGFW_bool RGFW_getPresentationSupport_Vulkan(VkPhysicalDevice physicalDevice, u32 queueFamilyIndex);
27092709
#endif
27102710

27112711
#ifdef RGFW_DIRECTX
@@ -5477,8 +5477,7 @@ VkResult RGFW_window_createSurface_Vulkan(RGFW_window* win, VkInstance instance,
54775477
}
54785478
#endif
54795479

5480-
RGFW_bool RGFW_getPresentationSupport_Vulkan(VkInstance instance, VkPhysicalDevice physicalDevice, u32 queueFamilyIndex) {
5481-
RGFW_ASSERT(instance);
5480+
RGFW_bool RGFW_getPresentationSupport_Vulkan(VkPhysicalDevice physicalDevice, u32 queueFamilyIndex) {
54825481
if (_RGFW == NULL) RGFW_init();
54835482
#ifdef RGFW_X11
54845483

@@ -5491,7 +5490,11 @@ RGFW_bool RGFW_getPresentationSupport_Vulkan(VkInstance instance, VkPhysicalDevi
54915490
RGFW_bool wlout = vkGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, _RGFW->wl_display);
54925491
return wlout;
54935492
#elif defined(RGFW_WINDOWS)
5493+
RGFW_bool out = vkGetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex);
5494+
return out;
54945495
#elif defined(RGFW_MACOS) && !defined(RGFW_MACOS_X11)
5496+
RGFW_UNUSED(physicalDevice);
5497+
RGFW_UNUSED(queueFamilyIndex);
54955498
return RGFW_FALSE; /* TODO */
54965499
#endif
54975500
}

0 commit comments

Comments
 (0)