Changeset 603b5bc in opengl-game for vulkan-utils.cpp


Ignore:
Timestamp:
Oct 22, 2019, 7:53:48 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
34bdf3a
Parents:
e83b155
git-author:
Dmitry Portnoy <dmitry.portnoy@…> (10/22/19 19:10:44)
git-committer:
Dmitry Portnoy <dmitry.portnoy@…> (10/22/19 19:53:48)
Message:

In vulkangame, add code to create the frame buffers and command buffers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-utils.cpp

    re83b155 r603b5bc  
    308308
    309309   image.imageView = createImageView(device, image.image, VK_FORMAT_R8G8B8A8_UNORM, VK_IMAGE_ASPECT_COLOR_BIT);
     310}
     311
     312void VulkanUtils::createDepthImage(VkDevice device, VkPhysicalDevice physicalDevice, VkCommandPool commandPool,
     313      VkFormat depthFormat, VkExtent2D extent, VulkanImage& image, VkQueue graphicsQueue) {
     314   createImage(device, physicalDevice, extent.width, extent.height, depthFormat, VK_IMAGE_TILING_OPTIMAL,
     315      VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, image);
     316   image.imageView = createImageView(device, image.image, depthFormat, VK_IMAGE_ASPECT_DEPTH_BIT);
     317
     318   transitionImageLayout(device, commandPool, image.image, depthFormat, VK_IMAGE_LAYOUT_UNDEFINED,
     319      VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, graphicsQueue);
    310320}
    311321
Note: See TracChangeset for help on using the changeset viewer.