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

Method createCommandBuffers

code/29_mipmapping.cpp:1327–1339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1325 }
1326
1327 void createCommandBuffers() {
1328 commandBuffers.resize(MAX_FRAMES_IN_FLIGHT);
1329
1330 VkCommandBufferAllocateInfo allocInfo{};
1331 allocInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
1332 allocInfo.commandPool = commandPool;
1333 allocInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
1334 allocInfo.commandBufferCount = (uint32_t) commandBuffers.size();
1335
1336 if (vkAllocateCommandBuffers(device, &allocInfo, commandBuffers.data()) != VK_SUCCESS) {
1337 throw std::runtime_error("failed to allocate command buffers!");
1338 }
1339 }
1340
1341 void recordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) {
1342 VkCommandBufferBeginInfo beginInfo{};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected