- improve swap chain resize and handle the edge cases for the swap chain

This commit is contained in:
Magnus Norddahl 2019-04-08 19:23:37 +02:00
commit c98dfd1790
4 changed files with 134 additions and 37 deletions

View file

@ -23,7 +23,7 @@ class VulkanFrameBuffer : public SystemBaseFrameBuffer
public:
VulkanDevice *device;
std::unique_ptr<VulkanSwapChain> swapChain;
uint32_t presentImageIndex = 0;
uint32_t presentImageIndex = 0xffffffff;
VulkanCommandBuffer *GetTransferCommands();
VulkanCommandBuffer *GetDrawCommands();
@ -124,9 +124,6 @@ private:
std::unique_ptr<VulkanFence> mRenderFinishedFence;
VkRenderBuffers *mActiveRenderBuffers = nullptr;
int lastSwapWidth = 0;
int lastSwapHeight = 0;
};
inline VulkanFrameBuffer *GetVulkanFrameBuffer() { return static_cast<VulkanFrameBuffer*>(screen); }