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

Method createCommandPool

code/21_index_buffer.cpp:651–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649 }
650
651 void createCommandPool() {
652 QueueFamilyIndices queueFamilyIndices = findQueueFamilies(physicalDevice);
653
654 VkCommandPoolCreateInfo poolInfo{};
655 poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
656 poolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
657 poolInfo.queueFamilyIndex = queueFamilyIndices.graphicsFamily.value();
658
659 if (vkCreateCommandPool(device, &poolInfo, nullptr, &commandPool) != VK_SUCCESS) {
660 throw std::runtime_error("failed to create graphics command pool!");
661 }
662 }
663
664 void createVertexBuffer() {
665 VkDeviceSize bufferSize = sizeof(vertices[0]) * vertices.size();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected