2 using SiliconStudio.Paradox.Effects.Modules;
3 using SiliconStudio.Paradox.Games;
4 using SiliconStudio.Paradox.Graphics;
7 namespace SiliconStudio.
Paradox.Effects
11 private DelegateHolder<ThreadContext>.DelegateType startPassAction;
12 private DelegateHolder<ThreadContext>.DelegateType endPassAction;
16 EnableSetTargets =
true;
17 Parameters.RegisterParameter(RenderTargetKeys.StreamTarget);
26 public bool EnableSetTargets {
get; set; }
28 public virtual Buffer StreamTarget
32 return Parameters.Get(RenderTargetKeys.StreamTarget);
36 Parameters.Set(RenderTargetKeys.StreamTarget, value);
41 public override void Load()
45 if (OfflineCompilation)
50 startPassAction = (threadContext) => threadContext.GraphicsDevice.SetStreamTargets(StreamTarget);
51 endPassAction = (threadContext) => threadContext.GraphicsDevice.SetStreamTargets(null);
53 RenderPass.StartPass += startPassAction;
54 RenderPass.EndPass += endPassAction;
62 if (OfflineCompilation)
67 RenderPass.StartPass -= startPassAction;
68 RenderPass.EndPass -= endPassAction;
70 startPassAction = null;
All-in-One Buffer class linked SharpDX.Direct3D11.Buffer.
SiliconStudio.Paradox.Graphics.Buffer Buffer