Updated Tutorial03 to incorporate changes introduted in VulkanCommon class (added semaphores, removed image view creation for each swapchain image).

This commit is contained in:
plapins
2016-04-22 23:16:01 +02:00
parent ff48362533
commit e9929a92a7
3 changed files with 58 additions and 66 deletions

View File

@@ -16,16 +16,6 @@
namespace ApiWithoutSecrets {
// ************************************************************ //
// FramebufferObject //
// //
// Vulkan Framebuffer's parameters container class //
// ************************************************************ //
struct FramebufferParameters {
VkImageView ImageView;
VkFramebuffer Handle;
};
// ************************************************************ //
// VulkanTutorial03Parameters //
// //
@@ -33,17 +23,21 @@ namespace ApiWithoutSecrets {
// ************************************************************ //
struct VulkanTutorial03Parameters {
VkRenderPass RenderPass;
std::vector<FramebufferParameters> FramebufferObjects;
std::vector<VkFramebuffer> Framebuffers;
VkPipeline GraphicsPipeline;
VkSemaphore ImageAvailableSemaphore;
VkSemaphore RenderingFinishedSemaphore;
VkCommandPool GraphicsCommandPool;
std::vector<VkCommandBuffer> GraphicsCommandBuffers;
VkPipeline GraphicsPipeline;
VulkanTutorial03Parameters() :
RenderPass( VK_NULL_HANDLE ),
FramebufferObjects(),
Framebuffers(),
GraphicsCommandPool( VK_NULL_HANDLE ),
GraphicsCommandBuffers(),
GraphicsPipeline( VK_NULL_HANDLE ) {
GraphicsPipeline( VK_NULL_HANDLE ),
ImageAvailableSemaphore( VK_NULL_HANDLE ),
RenderingFinishedSemaphore( VK_NULL_HANDLE ) {
}
};
@@ -60,6 +54,7 @@ namespace ApiWithoutSecrets {
bool CreateRenderPass();
bool CreateFramebuffers();
bool CreatePipeline();
bool CreateSemaphores();
bool CreateCommandBuffers();
bool RecordCommandBuffers();