Changeset e83b155 in opengl-game for vulkan-game.cpp


Ignore:
Timestamp:
Oct 18, 2019, 2:40:47 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
603b5bc
Parents:
b794178
git-author:
Dmitry Portnoy <dmitry.portnoy@…> (10/18/19 14:38:29)
git-committer:
Dmitry Portnoy <dmitry.portnoy@…> (10/18/19 14:40:47)
Message:

In vulkangame, destroy the texture sampler, all the uniform buffer resources, and all the resources for each Vulkan image before terminating the program

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    rb794178 re83b155  
    231231   cleanupSwapChain();
    232232
     233   VulkanUtils::destroyVulkanImage(device, floorTextureImage);
     234   VulkanUtils::destroyVulkanImage(device, sdlOverlayImage);
     235
     236   vkDestroySampler(device, textureSampler, nullptr);
     237
    233238   for (GraphicsPipeline_Vulkan pipeline : graphicsPipelines) {
    234239      pipeline.cleanupBuffers();
     
    660665
    661666   vkDestroySwapchainKHR(device, swapChain, nullptr);
    662 }
     667
     668   for (size_t i = 0; i < swapChainImages.size(); i++) {
     669      vkDestroyBuffer(device, uniformBuffers[i], nullptr);
     670      vkFreeMemory(device, uniformBuffersMemory[i], nullptr);
     671   }
     672}
Note: See TracChangeset for help on using the changeset viewer.