Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
CompilerParameters.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using SiliconStudio.Core;
4 using SiliconStudio.Paradox.Effects;
5 using SiliconStudio.Paradox.Graphics;
6 
7 namespace SiliconStudio.Paradox.Shaders.Compiler
8 {
9  /// <summary>
10  /// Parameters used for compilation.
11  /// </summary>
12  [DataContract]
14  {
15  /// <summary>
16  /// The compiler platform type.
17  /// </summary>
18  public static readonly ParameterKey<GraphicsPlatform> GraphicsPlatformKey = ParameterKeys.New<GraphicsPlatform>();
19 
20  /// <summary>
21  /// The graphics profile target type.
22  /// </summary>
23  public static readonly ParameterKey<GraphicsProfile> GraphicsProfileKey = ParameterKeys.New<GraphicsProfile>();
24 
25  /// <summary>
26  /// The debug flag.
27  /// </summary>
28  public static readonly ParameterKey<bool> DebugKey = ParameterKeys.New(true);
29 
30  /// <summary>
31  /// Initializes a new instance of the <see cref="CompilerParameters"/> class.
32  /// </summary>
34  {
35  Platform = GraphicsPlatform.Direct3D11;
36  Profile = GraphicsProfile.Level_11_0;
37  }
38 
39  /// <summary>
40  /// The shader target type
41  /// </summary>
42  [DataMemberIgnore]
44  {
45  get
46  {
47  return Get(GraphicsPlatformKey);
48  }
49 
50  set
51  {
52  Set(GraphicsPlatformKey, value);
53  }
54  }
55 
56  /// <summary>
57  /// The shader target type
58  /// </summary>
59  [DataMemberIgnore]
60  public GraphicsProfile Profile
61  {
62  get
63  {
64  return Get(GraphicsProfileKey);
65  }
66 
67  set
68  {
69  Set(GraphicsProfileKey, value);
70  }
71  }
72 
73  /// <summary>
74  /// Gets or sets a value indicating whether shader must be compiled with debug info.
75  /// </summary>
76  /// <value><c>true</c> if shader must be compiled with debug info; otherwise, <c>false</c>.</value>
77  [DataMemberIgnore]
78  public bool Debug
79  {
80  get
81  {
82  return Get(DebugKey);
83  }
84 
85  set
86  {
87  Set(DebugKey, value);
88  }
89  }
90  }
91 }
Key of an effect parameter.
Definition: ParameterKey.cs:15
GraphicsPlatform
The graphics platform.
Platform specific queries and functions.
Definition: Platform.cs:15
GraphicsProfile
Identifies the set of supported devices for the demo based on device capabilities.
A container to handle a hierarchical collection of effect variables.
CompilerParameters()
Initializes a new instance of the CompilerParameters class.