mirror of
				https://gitea.windcorp.ru/Wind-Corporation/Progressia.git
				synced 2025-11-04 16:30:49 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			657 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			657 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#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
 |