Modified Tutorial04: improved code maintenance (replaced static arrays with std::vectors); changed order of some operations (moved vertex buffer creation before rendering resources creation).

This commit is contained in:
plapins
2016-07-02 22:45:16 +02:00
parent 67b0dd27c9
commit 83666e93b9
3 changed files with 114 additions and 111 deletions

View File

@@ -99,8 +99,8 @@ namespace ApiWithoutSecrets {
bool CreateRenderPass();
bool CreatePipeline();
bool CreateRenderingResources();
bool CreateVertexBuffer();
bool CreateRenderingResources();
bool Draw() override;
@@ -109,12 +109,12 @@ namespace ApiWithoutSecrets {
Tools::AutoDeleter<VkShaderModule, PFN_vkDestroyShaderModule> CreateShaderModule( const char* filename );
Tools::AutoDeleter<VkPipelineLayout, PFN_vkDestroyPipelineLayout> CreatePipelineLayout();
bool AllocateBufferMemory( VkBuffer buffer, VkDeviceMemory *memory );
bool CreateCommandPool( uint32_t queue_family_index, VkCommandPool *pool );
bool AllocateCommandBuffers( VkCommandPool pool, uint32_t count, VkCommandBuffer *command_buffers );
bool CreateCommandBuffers();
bool CreateSemaphores();
bool CreateFences();
bool AllocateBufferMemory( VkBuffer buffer, VkDeviceMemory *memory );
bool PrepareFrame( VkCommandBuffer command_buffer, const ImageParameters &image_parameters, VkFramebuffer &framebuffer );
bool CreateFramebuffer( VkFramebuffer &framebuffer, VkImageView image_view );