16 virtual void SetClearColor(
const glm::vec4& color)
override;
17 virtual void Clear()
override;
19 virtual void BeginScene()
override;
20 virtual void DrawIndexed(std::shared_ptr<VertexArray> vertexArray)
override;
21 virtual void EndScene()
override;
23 void AllocateCommandBuffers();
24 void RecordCommandBuffers(VkCommandBuffer commandBuffer, uint32_t imageIndex);
25 void SubmitCommandBuffers();
26 void CreateSynchronicity();
27 void ClearVulkanRendererAPI();
28 void RemoveSynchronicity();
29 void RecreateCommandBuffersPipelineSwapchain();
30 void RecreateCommandBuffersAndSwapChain();
33 const std::vector<VkCommandBuffer>& GetCommandBuffers()
const {
return m_commandBuffers; }
34 const int& GetMaxFramesInFlight()
const {
return MAX_FRAMES_IN_FLIGHT; }
35 const std::vector<VkFence>& GetFences()
const {
return m_InFlightFences; }
36 const std::vector<VkSemaphore>& GetImageAvailableSemaphores()
const {
return m_ImageAvailableSemaphores; }
37 const std::vector<VkSemaphore> GetRenderFinishedSemaphore()
const {
return m_RenderFinishedSemaphores; }
40 size_t m_CurrentFrame = 0;
42 std::vector<VkCommandBuffer> m_commandBuffers;
43 std::vector<std::shared_ptr<VulkanVertexArray>> m_VulkaVertexArrays;
45 std::vector<VkSemaphore> m_ImageAvailableSemaphores;
46 std::vector<VkSemaphore> m_RenderFinishedSemaphores;
47 std::vector<VkFence> m_InFlightFences;
51 const int MAX_FRAMES_IN_FLIGHT = 2;
53 bool m_bAllocateCommandBuffers;