void op3d::Engine::initVulkan() { instance.create(); callback.setup(instance); surface.create(instance, window); physicalDevice.create(instance, surface); device.create(physicalDevice, surface, graphicsQueue, presentQueue); swapChain.create(device, surface, physicalDevice, window); swapChain.createImageViews(device, swapChainImageViews); createRenderPass(); createDescriptorSetLayout(); createGraphicsPipeline(); commandBufferManager.createCommandPool(physicalDevice, surface); createDepthResources(); createFramebuffers(); createTextureImage(); createTextureImageView(); createTextureSampler(); createVertexBuffer(); createIndexBuffer(); createUniformBuffer(); descriptorPool.createPool(); descriptorSet.createSet(uniformBuffer, textureImageView, textureSampler, descriptorSetLayout, descriptorPool, device); createCommandBuffers(); createSemaphores(); }
void CDebugDrawer::resize(int width, int height) { m_currentWidth = width; m_currentHeight = height; removeFramebuffers(); createFramebuffers(width, height); }
void op3d::Engine::recreateSwapChain() { vkDeviceWaitIdle(device); swapChain.create(device, surface, physicalDevice, window); swapChain.createImageViews(device, swapChainImageViews); createRenderPass(); createGraphicsPipeline(); createDepthResources(); createFramebuffers(); createCommandBuffers(); }