Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
StateShaderPlugin.cs
Go to the documentation of this file.
1 // Copyright (c) 2011 Silicon Studio
2 
3 using System.Collections.Generic;
4 using System.IO;
5 using System.Linq;
6 
7 namespace SiliconStudio.Paradox.Effects
8 {
9  /// <summary>
10  /// Basic shader plugin built directly from shader source file.
11  /// </summary>
12  public class StateShaderPlugin : ShaderPlugin<RenderPassPlugin>
13  {
14  /// <summary>
15  /// Initializes a new instance of the <see cref="StateShaderPlugin"/> class.
16  /// </summary>
18  {
19  }
20  public bool UseBlendState { get; set; }
21 
22  public bool UseRasterizerState { get; set; }
23 
24  public bool UseDepthStencilState { get; set; }
25 
26  public override void SetupResources(EffectMesh effectMesh)
27  {
28  if (UseBlendState)
29  Effect.Parameters.RegisterParameter(BlendStateKey);
30 
31  if (UseRasterizerState)
32  Effect.Parameters.RegisterParameter(RasterizerStateKey);
33 
34  if (UseDepthStencilState)
35  Effect.Parameters.RegisterParameter(DepthStencilStateKey);
36  }
37  }
38 }
Basic shader plugin built directly from shader source file.
StateShaderPlugin()
Initializes a new instance of the StateShaderPlugin class.
override void SetupResources(EffectMesh effectMesh)