mirror of
https://gitea.windcorp.ru/Wind-Corporation/Progressia.git
synced 2025-10-14 21:13:10 +03:00
Initial commit
This commit is contained in:
36
desktop/graphics/vulkan_frame.h
Normal file
36
desktop/graphics/vulkan_frame.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "vulkan_common.h"
|
||||
|
||||
namespace progressia {
|
||||
namespace desktop {
|
||||
|
||||
class Frame : public VkObjectWrapper {
|
||||
private:
|
||||
Vulkan &vulkan;
|
||||
|
||||
VkCommandBuffer commandBuffer;
|
||||
|
||||
VkSemaphore imageAvailableSemaphore;
|
||||
VkSemaphore renderFinishedSemaphore;
|
||||
VkFence inFlightFence;
|
||||
|
||||
std::vector<VkClearValue> clearValues;
|
||||
|
||||
std::optional<uint32_t> imageIndexInFlight;
|
||||
|
||||
public:
|
||||
Frame(Vulkan &vulkan);
|
||||
~Frame();
|
||||
|
||||
/*
|
||||
* Returns false when the frame should be skipped
|
||||
*/
|
||||
bool startRender();
|
||||
void endRender();
|
||||
|
||||
VkCommandBuffer getCommandBuffer();
|
||||
};
|
||||
|
||||
} // namespace desktop
|
||||
} // namespace progressia
|
Reference in New Issue
Block a user