| 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(); |
nothing calls this directly
no outgoing calls
no test coverage detected