MCPcopy Create free account
hub / github.com/Overv/VulkanTutorial / createCommandPool

Method createCommandPool

code/24_texture_image.cpp:709–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707 }
708
709 void createCommandPool() {
710 QueueFamilyIndices queueFamilyIndices = findQueueFamilies(physicalDevice);
711
712 VkCommandPoolCreateInfo poolInfo{};
713 poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
714 poolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
715 poolInfo.queueFamilyIndex = queueFamilyIndices.graphicsFamily.value();
716
717 if (vkCreateCommandPool(device, &poolInfo, nullptr, &commandPool) != VK_SUCCESS) {
718 throw std::runtime_error("failed to create graphics command pool!");
719 }
720 }
721
722 void createTextureImage() {
723 int texWidth, texHeight, texChannels;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected