public Pass GetPass(StringID name) { foreach (var pass in Pass) { if (pass.Name == name) { return(pass); } } return(null); }
public Bone GetBone(StringID name) { foreach (var bone in bones_) { if (bone.name_ == name) { return(bone); } } return(null); }
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); }
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; } } } }
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); } }
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"; } }
public void UnregResourceSet(StringID id) { resourceSets.Remove(id); }
public void RegResourceSet(StringID id, DescriptorSet resSet) { resourceSets[id] = resSet; }
public void RegResource(StringID id, IBindableResource res) { resources[id] = res; }
public Block(StringID name) { this.name = name; }