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

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

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