Example #1
0
        public Pass GetPass(StringID name)
        {
            foreach (var pass in Pass)
            {
                if (pass.Name == name)
                {
                    return(pass);
                }
            }

            return(null);
        }
Example #2
0
        public Bone GetBone(StringID name)
        {
            foreach (var bone in bones_)
            {
                if (bone.name_ == name)
                {
                    return(bone);
                }
            }

            return(null);
        }
Example #3
0
        public int GetChild(StringID name)
        {
            if (blockToID.TryGetValue(name, out int id))
            {
                return(id);
            }

            Blocks.Add(new Block(name));
            int newID = Blocks.Count - 1;

            blockToID[name] = newID;
            return(newID);
        }
Example #4
0
 public void UpdateResourceSet(StringID name, IBindableResource tex)
 {
     foreach (var rs in ResourceSet)
     {
         foreach (var binding in rs.resourceLayout.Bindings)
         {
             if (binding.name == name)
             {
                 rs.BindResource(binding.binding, tex);
                 rs.UpdateSets();
                 return;
             }
         }
     }
 }
Example #5
0
        public AttachmentInfo(StringID id, SizeHint sizeHint, VkFormat format, VkImageUsageFlags usage, VkSampleCountFlags samples = VkSampleCountFlags.Count1)
        {
            this.id               = id;
            this.SizeHint         = sizeHint;
            this.Usage            = usage;
            attachmentDescription = new VkAttachmentDescription(format, samples);

            if (Device.IsDepthFormat(format))
            {
                ClearValue = new VkClearDepthStencilValue(1, 0);
            }
            else
            {
                ClearValue = new VkClearColorValue(0, 0, 0, 1);
            }
        }
Example #6
0
        public AttachmentInfo(VkFormat format)
        {
            this.RTType           = format.IsDepthFormat() ? RTType.DepthOutput : RTType.ColorOutput;
            attachmentDescription = new VkAttachmentDescription(format, VkSampleCountFlags.Count1);

            if (Device.IsDepthFormat(format))
            {
                ClearValue = new VkClearDepthStencilValue(1, 0);
                id         = "depth";
            }
            else
            {
                ClearValue = new VkClearColorValue(0, 0, 0, 1);
                id         = "output_color";
            }
        }
Example #7
0
 public void UnregResourceSet(StringID id)
 {
     resourceSets.Remove(id);
 }
Example #8
0
 public void RegResourceSet(StringID id, DescriptorSet resSet)
 {
     resourceSets[id] = resSet;
 }
Example #9
0
 public void RegResource(StringID id, IBindableResource res)
 {
     resources[id] = res;
 }
Example #10
0
 public Block(StringID name)
 {
     this.name = name;
 }