Exemple #1
0
        private void createCommandPool()
        {
            QueueFamilyIndices queueFamilyIndices = findQueueFamilies(physicalDevice);

            VkCommandPoolCreateInfo poolInfo = new VkCommandPoolCreateInfo();

            poolInfo.sType            = VkStructureType.VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
            poolInfo.queueFamilyIndex = queueFamilyIndices.graphicsFamily;

            VkResult result = Vulkan.vkCreateCommandPool(device, poolInfo, null, out commandPool);

            if (result != VkResult.VK_SUCCESS)
            {
                throw Program.Throw("failed to create command pool!", result);
            }
        }