Пример #1
0
        private DescriptorPool CreateDescriptorPool()
        {
            DescriptorPoolSize typeCount = new DescriptorPoolSize
            {
                Type            = DescriptorType.UniformBuffer,
                DescriptorCount = 1
            };

            DescriptorPoolCreateInfo createInfo = new DescriptorPoolCreateInfo
            {
                SType         = StructureType.DescriptorPoolCreateInfo,
                MaxSets       = 1,
                PoolSizeCount = 1,
                PPoolSizes    = &typeCount,
                Flags         = DescriptorPoolCreateFlags.DescriptorPoolCreateFreeDescriptorSetBit
            };

            DescriptorPool pool;

            var res = VkApi.CreateDescriptorPool(this.Device, &createInfo, null, &pool);

            if (res != Result.Success)
            {
                throw new VMASharp.VulkanResultException("Failed to create Descriptor Pool!", res);
            }

            return(pool);
        }