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

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

            return(null);
        }
Exemple #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);
        }
Exemple #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;
             }
         }
     }
 }
Exemple #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);
            }
        }
Exemple #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";
            }
        }
Exemple #7
0
 public void UnregResourceSet(StringID id)
 {
     resourceSets.Remove(id);
 }
Exemple #8
0
 public void RegResourceSet(StringID id, DescriptorSet resSet)
 {
     resourceSets[id] = resSet;
 }
Exemple #9
0
 public void RegResource(StringID id, IBindableResource res)
 {
     resources[id] = res;
 }
Exemple #10
0
 public Block(StringID name)
 {
     this.name = name;
 }