4 using System.Collections.Generic;
5 using System.Collections.ObjectModel;
6 using System.Collections.Specialized;
7 using SiliconStudio.Core;
8 using SiliconStudio.Core.Collections;
9 using SiliconStudio.Core.Extensions;
10 using SiliconStudio.Paradox.Engine;
12 namespace SiliconStudio.
Paradox.Effects
14 public delegate
void UpdateMeshesDelegate(RenderPass currentRenderPass, ref FastList<RenderMesh> meshes);
21 private readonly TrackingCollection<Renderer> renderers;
22 private readonly TrackingCollection<RenderPass> children;
40 renderers =
new TrackingCollection<Renderer>();
41 renderers.CollectionChanged += (o, e) =>
46 case NotifyCollectionChangedAction.Add:
48 if (processor.Pass != null)
49 throw new InvalidOperationException(
"Renderer.Pass is already attached to another pass.");
50 processor.Pass =
this;
52 case NotifyCollectionChangedAction.Remove:
54 if (processor.Pass !=
this)
55 throw new InvalidOperationException(
"Renderer.Pass is not attached to a this pass..");
62 children =
new TrackingCollection<RenderPass>();
63 children.CollectionChanged += (o, e) =>
68 case NotifyCollectionChangedAction.Add:
70 if (renderPass.Parent != null)
71 throw new InvalidOperationException(
"Pass.Parent should be null.");
72 renderPass.Parent =
this;
74 case NotifyCollectionChangedAction.Remove:
76 if (renderPass.Parent !=
this)
77 throw new InvalidOperationException(
"Pass.Parent is not set properly.");
78 renderPass.Parent = null;
90 public bool Enabled {
get; set; }
112 while (current.Parent != null)
114 current = current.Parent;
144 public TrackingCollection<Renderer> Renderers
158 public TrackingCollection<RenderPass> Children
160 get {
return children; }
165 return string.Format(
"{0}({1})", GetType().Name, Name ??
"");
DelegateHolder< RenderContext > EndPass
The end action.
override string ToString()
RenderPass(string name)
Initializes a new instance of the RenderPass class.
Performs render pipeline transformations attached to a specific RenderPass.
Base class for a framework component.
RenderPass()
Initializes a new instance of the RenderPass class.
DelegateHolder< RenderContext > StartPass
The start action.
delegate void UpdateMeshesDelegate(RenderPass currentRenderPass, ref FastList< RenderMesh > meshes)
RenderPass is a hierarchy that defines how to collect and render meshes.
Defines an entry point for mesh instantiation and recursive rendering.
A container to handle a hierarchical collection of effect variables.