示例#1
0
        private void createDescriptorSetLayout()
        {
            var uboLayoutBinding = new Vk.DescriptorSetLayoutBinding();

            uboLayoutBinding.Binding         = 0;
            uboLayoutBinding.DescriptorType  = Vk.DescriptorType.UniformBuffer;
            uboLayoutBinding.DescriptorCount = 1;
            uboLayoutBinding.StageFlags      = Vk.ShaderStageFlags.Vertex;

            var layoutInfo = new Vk.DescriptorSetLayoutCreateInfo();

            layoutInfo.BindingCount = 1;
            layoutInfo.Bindings     = new Vk.DescriptorSetLayoutBinding[] { uboLayoutBinding };

            try {
                this.DescriptorSetLayout = this.Device.CreateDescriptorSetLayout(layoutInfo);
            } catch (Vk.ResultException result) {
                throw new VkException("An error occurred while creating the descriptor set layout.", result);
            }
        }
示例#2
0
 public void SetDescriptorSetLayout(Vk.DescriptorSetLayout layout)
 {
     this.descriptorSetLayout = layout;
 }