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

Method createCommandPool

code/19_vertex_buffer.cpp:640–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638 }
639
640 void createCommandPool() {
641 QueueFamilyIndices queueFamilyIndices = findQueueFamilies(physicalDevice);
642
643 VkCommandPoolCreateInfo poolInfo{};
644 poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
645 poolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
646 poolInfo.queueFamilyIndex = queueFamilyIndices.graphicsFamily.value();
647
648 if (vkCreateCommandPool(device, &poolInfo, nullptr, &commandPool) != VK_SUCCESS) {
649 throw std::runtime_error("failed to create command pool!");
650 }
651 }
652
653 void createVertexBuffer() {
654 VkBufferCreateInfo bufferInfo{};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected