diff --git a/src/VkBootstrap.cpp b/src/VkBootstrap.cpp index 1624fdd..39ee479 100644 --- a/src/VkBootstrap.cpp +++ b/src/VkBootstrap.cpp @@ -1858,7 +1858,7 @@ SwapchainBuilder& SwapchainBuilder::set_allocation_callbacks(VkAllocationCallbac info.allocation_callbacks = callbacks; return *this; } -SwapchainBuilder& SwapchainBuilder::use_dispatch_table(DispatchTable& dispatch_table) { +SwapchainBuilder& SwapchainBuilder::use_dispatch_table(const DispatchTable& dispatch_table) { info.dispatch_table = &dispatch_table; return *this; } diff --git a/src/VkBootstrap.h b/src/VkBootstrap.h index 7b1c0c4..71dfa82 100644 --- a/src/VkBootstrap.h +++ b/src/VkBootstrap.h @@ -715,7 +715,7 @@ class SwapchainBuilder { SwapchainBuilder& set_allocation_callbacks(VkAllocationCallbacks* callbacks); // Provide an optional dispatch table for the builder to use for device pfn's - SwapchainBuilder& use_dispatch_table(DispatchTable& dispatch_table); + SwapchainBuilder& use_dispatch_table(const DispatchTable& dispatch_table); private: void add_desired_formats(std::vector& formats) const; @@ -741,7 +741,7 @@ class SwapchainBuilder { bool clipped = true; VkSwapchainKHR old_swapchain = VK_NULL_HANDLE; VkAllocationCallbacks* allocation_callbacks = VK_NULL_HANDLE; - DispatchTable* dispatch_table = nullptr; + const DispatchTable* dispatch_table = nullptr; } info; };