Changeset f94eea9 in opengl-game for vulkan-game.cpp
- Timestamp:
- Sep 27, 2019, 7:20:55 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 6fc24c7
- Parents:
- 054d9ed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-game.cpp
r054d9ed rf94eea9 101 101 createLogicalDevice(validationLayers, deviceExtensions); 102 102 createSwapChain(); 103 createImageViews(); 103 104 } 104 105 … … 175 176 gui->shutdown(); 176 177 delete gui; 177 }178 179 void VulkanGame::cleanupSwapChain() {180 vkDestroySwapchainKHR(device, swapChain, nullptr);181 178 } 182 179 … … 389 386 createInfo.queueFamilyIndexCount = 2; 390 387 createInfo.pQueueFamilyIndices = queueFamilyIndices; 391 } 392 else { 388 } else { 393 389 createInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; 394 390 createInfo.queueFamilyIndexCount = 0; … … 413 409 swapChainExtent = extent; 414 410 } 411 412 void VulkanGame::createImageViews() { 413 swapChainImageViews.resize(swapChainImages.size()); 414 415 for (size_t i = 0; i < swapChainImages.size(); i++) { 416 swapChainImageViews[i] = VulkanUtils::createImageView(device, swapChainImages[i], swapChainImageFormat, 417 VK_IMAGE_ASPECT_COLOR_BIT); 418 } 419 } 420 421 void VulkanGame::cleanupSwapChain() { 422 for (auto imageView : swapChainImageViews) { 423 vkDestroyImageView(device, imageView, nullptr); 424 } 425 426 vkDestroySwapchainKHR(device, swapChain, nullptr); 427 }
Note:
See TracChangeset
for help on using the changeset viewer.