Better structure again (whoohoo)!
This commit is contained in:
@@ -23,7 +23,12 @@ namespace cve {
|
||||
|
||||
VkCommandBuffer getCurrentCommandBuffer() const {
|
||||
assert(isFrameStarted && "Cannot get command buffer when frame is not in progress");
|
||||
return commandBuffers[currentImageIndex];
|
||||
return commandBuffers[currentFrameIndex];
|
||||
}
|
||||
|
||||
int getFrameIndex() const {
|
||||
assert(isFrameStarted && "Cannot get frame index when frame is not started");
|
||||
return currentFrameIndex;
|
||||
}
|
||||
|
||||
VkCommandBuffer beginFrame();
|
||||
@@ -41,7 +46,8 @@ namespace cve {
|
||||
std::unique_ptr<CveSwapChain> cveSwapChain;
|
||||
std::vector<VkCommandBuffer> commandBuffers;
|
||||
|
||||
uint32_t currentImageIndex;
|
||||
uint32_t currentImageIndex = 0;
|
||||
int currentFrameIndex = 0;
|
||||
bool isFrameStarted = false;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user