Ejemplo n.º 1
0
        public DescriptorSet Bind(uint dstBinding, ref VkDescriptorImageInfo imageInfo)
        {
            var descriptorType = resourceLayout.Bindings[(int)dstBinding].descriptorType;

            for (int img = 0; img < Swapchain.IMAGE_COUNT; img++)
            {
                AddWriteDescriptorSet(img, new VkWriteDescriptorSet(dstBinding, descriptorSet[img], descriptorType, ref imageInfo, 1));
            }
            return(this);
        }
Ejemplo n.º 2
0
 public unsafe VkWriteDescriptorSet(
     uint binding,
     VkDescriptorSet dstSet,
     VkDescriptorType type,
     ref VkDescriptorImageInfo imageInfo,
     uint descriptorCount = 1)
 {
     this.sType            = VkStructureType.WriteDescriptorSet;
     this.pNext            = null;
     this.dstSet           = dstSet;
     this.descriptorType   = type;
     this.dstBinding       = binding;
     this.pImageInfo       = (VkDescriptorImageInfo *)Unsafe.AsPointer(ref imageInfo);
     this.descriptorCount  = descriptorCount;
     this.pBufferInfo      = null;
     this.pTexelBufferView = null;
     this.dstArrayElement  = 0;
 }
Ejemplo n.º 3
0
 public void UpdateDescriptor()
 {
     descriptor = new VkDescriptorImageInfo(sampler, imageView, imageLayout);
 }
Ejemplo n.º 4
0
 public ImageView(Image image, ref VkImageViewCreateInfo imageViewCreateInfo)
 {
     handle     = Device.CreateImageView(ref imageViewCreateInfo);
     Image      = image;
     descriptor = new VkDescriptorImageInfo(Sampler.ClampToEdge, this, VkImageLayout.ShaderReadOnlyOptimal);
 }