From 51f76c48450fe7b9cdb8f428f1e44693af4f1e8f Mon Sep 17 00:00:00 2001 From: saschawillems Date: Fri, 4 Mar 2016 16:54:56 +0100 Subject: [PATCH] No longer submit initial depth/stencil image barrier outside of setup command buffer (#57), updated swapChain usage to recent refactorings --- android/triangle/triangle.NativeActivity/main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/android/triangle/triangle.NativeActivity/main.cpp b/android/triangle/triangle.NativeActivity/main.cpp index 32358c53..9a3ee62d 100644 --- a/android/triangle/triangle.NativeActivity/main.cpp +++ b/android/triangle/triangle.NativeActivity/main.cpp @@ -234,8 +234,8 @@ struct VulkanExample vkGetPhysicalDeviceMemoryProperties(physicalDevice, &deviceMemoryProperties); // Swap chain - swapChain.init(instance, physicalDevice, device); - swapChain.initSwapChain(app->window); + swapChain.connect(instance, physicalDevice, device); + swapChain.initSurface(app->window); // Command buffer pool VkCommandPoolCreateInfo cmdPoolInfo = {}; @@ -254,15 +254,17 @@ struct VulkanExample createSetupCommandBuffer(); startSetupCommandBuffer(); - swapChain.setup(setupCmdBuffer, &width, &height); - flushSetupCommandBuffer(); - createCommandBuffers(); + swapChain.create(setupCmdBuffer, &width, &height); setupDepthStencil(); setupRenderPass(); setupFrameBuffer(); + flushSetupCommandBuffer(); + + createCommandBuffers(); + prepareVertices(); prepareUniformBuffers(); setupDescriptorSetLayout();