Refactored code in Tutorial 05 (changed order of operaions - moved rendering resources creation to the beginning).

This commit is contained in:
plapins
2016-07-05 00:20:14 +02:00
parent 05959fd7e5
commit 1570a40314
4 changed files with 112 additions and 118 deletions

View File

@@ -99,9 +99,9 @@ namespace ApiWithoutSecrets {
Tutorial05();
~Tutorial05();
bool CreateRenderingResources();
bool CreateRenderPass();
bool CreatePipeline();
bool CreateRenderingResources();
bool CreateVertexBuffer();
bool CreateStagingBuffer();
bool CopyVertexData();
@@ -111,13 +111,12 @@ namespace ApiWithoutSecrets {
private:
VulkanTutorial05Parameters Vulkan;
Tools::AutoDeleter<VkShaderModule, PFN_vkDestroyShaderModule> CreateShaderModule( const char* filename );
Tools::AutoDeleter<VkPipelineLayout, PFN_vkDestroyPipelineLayout> CreatePipelineLayout();
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 CreateSemaphore( VkSemaphore *semaphore );
bool CreateFence( VkFenceCreateFlags flags, VkFence *fence );
Tools::AutoDeleter<VkShaderModule, PFN_vkDestroyShaderModule> CreateShaderModule( const char* filename );
Tools::AutoDeleter<VkPipelineLayout, PFN_vkDestroyPipelineLayout> CreatePipelineLayout();
bool CreateBuffer( VkBufferUsageFlags usage, VkMemoryPropertyFlagBits memoryProperty, BufferParameters &buffer );
bool AllocateBufferMemory( VkBuffer buffer, VkMemoryPropertyFlagBits property, VkDeviceMemory *memory );
const std::vector<float>& GetVertexData() const;