/// <summary> /// Clears all the priority groups within this group. /// </summary> public void Clear(bool dispose) { // loop through each priority group and clear it's items. We don't wanna clear the group // list because it probably won't change frame by frame. foreach (var group in PriorityGroups.Values) { // clear the RenderPriorityGroup group.Clear(); } if (dispose) { PriorityGroups.Clear(); } }
/// <summary> /// </summary> public void AddRenderable(IRenderable item, Technique technique, ushort priority) { RenderPriorityGroup group = null; // see if there is a current queue group for this group id if (!PriorityGroups.ContainsKey(priority)) { // create a new queue group for this group id group = new RenderPriorityGroup(this, this.splitPassesByLightingType, this.splitNoShadowPasses, this.splitPassesByLightingType); // add the new group to cached render group PriorityGroups.Add(priority, group); } else { // retreive the existing queue group group = PriorityGroups[priority]; } // add the renderable to the appropriate group group.AddRenderable(item, technique); }