Changeset 0ae182f in opengl-game for vulkan-game.cpp


Ignore:
Timestamp:
Nov 11, 2019, 2:19:32 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
5a23277
Parents:
1f25a71
Message:

In vulkangame, finish implementing recreateSwapChain()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    r1f25a71 r0ae182f  
    7474}
    7575
    76 // TODO: Make some more initi functions, or call this initUI if the
     76// TODO: Make some more init functions, or call this initUI if the
    7777// amount of things initialized here keeps growing
    7878bool VulkanGame::initWindow(int width, int height, unsigned char guiFlags) {
     
    252252   graphicsPipelines.back().createDescriptorPool(swapChainImages);
    253253   graphicsPipelines.back().createDescriptorSets(swapChainImages);
    254 
    255    // TODO: Creating the descriptor pool and descriptor sets might need to be redone when the
    256    // swap chain is recreated
    257254
    258255   cout << "Created " << graphicsPipelines.size() << " graphics pipelines" << endl;
     
    958955   vkDeviceWaitIdle(device);
    959956
    960    //cleanupSwapChain();
     957   cleanupSwapChain();
     958
     959   createSwapChain();
     960   createImageViews();
     961   createRenderPass();
     962
     963   VulkanUtils::createDepthImage(device, physicalDevice, commandPool, findDepthFormat(), swapChainExtent,
     964      depthImage, graphicsQueue);
     965   createFramebuffers();
     966   createUniformBuffers();
     967
     968   graphicsPipelines[0].updateRenderPass(renderPass);
     969   graphicsPipelines[0].createPipeline("shaders/scene-vert.spv", "shaders/scene-frag.spv");
     970   graphicsPipelines[0].createDescriptorPool(swapChainImages);
     971   graphicsPipelines[0].createDescriptorSets(swapChainImages);
     972
     973   graphicsPipelines[1].updateRenderPass(renderPass);
     974   graphicsPipelines[1].createPipeline("shaders/overlay-vert.spv", "shaders/overlay-frag.spv");
     975   graphicsPipelines[1].createDescriptorPool(swapChainImages);
     976   graphicsPipelines[1].createDescriptorSets(swapChainImages);
     977
     978   createCommandBuffers();
    961979}
    962980
Note: See TracChangeset for help on using the changeset viewer.