Added full sync for buffers

This commit is contained in:
Ano-sys
2025-04-03 22:00:21 +02:00
parent 4288c6fa08
commit 811b5e0ae6
2 changed files with 38 additions and 23 deletions
+7 -4
View File
@@ -72,12 +72,15 @@ private:
VkPipeline graphicsPipeline;
VkCommandPool commandPool;
VkCommandBuffer commandBuffer;
std::vector<VkCommandBuffer> commandBuffers;
VkSemaphore imageAvailableSemaphore, renderFinishedSemaphore;
VkFence inFlightFence;
std::vector<VkSemaphore> imageAvailableSemaphores, renderFinishedSemaphores;
std::vector<VkFence> inFlightFences;
std::vector<VkFramebuffer> swapChainFramebuffers;
const int MAX_FRAMES_IN_FLIGHT = 2;
uint32_t currentFrame = 0;
#pragma endregion
bool checkValidationLayerSupport();
@@ -102,7 +105,7 @@ private:
void createRenderPass();
void createFrameBuffers();
void createCommandPool();
void createCommandBuffer();
void createCommandBuffers();
void recordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex);
void createSyncObjects();
void drawFrame();