Skip to content
Snippets Groups Projects
Verified Commit b53fd190 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

Some changes to weaken MS-soft

parent 876a37ad
No related branches found
No related tags found
1 merge request!12Resolve "Swapchain Class"
Pipeline #24807 passed
...@@ -33,7 +33,7 @@ namespace vkcv { ...@@ -33,7 +33,7 @@ namespace vkcv {
* @note The reference to our Swapchain variable is needed for the recreation step * @note The reference to our Swapchain variable is needed for the recreation step
*/ */
[[nodiscard]] [[nodiscard]]
vk::SwapchainKHR getSwapchain(); const vk::SwapchainKHR& getSwapchain() const;
/** /**
* gets the current surface object * gets the current surface object
......
...@@ -343,7 +343,7 @@ namespace vkcv ...@@ -343,7 +343,7 @@ namespace vkcv
m_Queues.graphicsQueue.submit(submitInfo); m_Queues.graphicsQueue.submit(submitInfo);
vk::Result presentResult; vk::Result presentResult;
const vk::SwapchainKHR swapchain = m_swapchain.getSwapchain(); const vk::SwapchainKHR& swapchain = m_swapchain.getSwapchain();
const vk::PresentInfoKHR presentInfo(1, &m_SyncResources.renderFinished, 1, &swapchain, &swapchainImageIndex, &presentResult); const vk::PresentInfoKHR presentInfo(1, &m_SyncResources.renderFinished, 1, &swapchain, &swapchainImageIndex, &presentResult);
m_Queues.presentQueue.presentKHR(presentInfo); m_Queues.presentQueue.presentKHR(presentInfo);
if (presentResult != vk::Result::eSuccess) { if (presentResult != vk::Result::eSuccess) {
......
...@@ -6,7 +6,7 @@ namespace vkcv { ...@@ -6,7 +6,7 @@ namespace vkcv {
: m_surface(surface), m_swapchain(swapchain), m_format( format), m_ImageCount(imageCount) : m_surface(surface), m_swapchain(swapchain), m_format( format), m_ImageCount(imageCount)
{} {}
vk::SwapchainKHR SwapChain::getSwapchain() { const vk::SwapchainKHR& SwapChain::getSwapchain() const {
return m_swapchain; return m_swapchain;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment