PageRenderTime 102ms CodeModel.GetById 41ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/Utilities/Graphics/ShaderFeatures/NoTexturingShaderFeature.cs

#
C# | 89 lines | 52 code | 7 blank | 30 comment | 0 complexity | 28e5adfaf9f16823d43af549fe1cb747 MD5 | raw file
 1using System.Collections.Generic;
 2using System.IO;
 3
 4namespace Delta.Utilities.Graphics.ShaderFeatures
 5{
 6	/// <summary>
 7	/// No texture shader feature. This is just used to disable texturing,
 8	/// which is on by default (via BasicShaderFeature).
 9	/// </summary>
10	public class NoTexturingShaderFeature : IShaderFeature
11	{
12		#region ShaderFeature (Public)
13		/// <summary>
14		/// Which shader feature flag is this ShaderFeature class using?
15		/// Important for loading this file via ShaderData.LoadShaderFeature.
16		/// Each flag should obviously only have one class for it!
17		/// </summary>
18		public ShaderFeatureFlags ShaderFeature
19		{
20			get
21			{
22				return ShaderFeatureFlags.NoTexturing;
23			}
24		}
25		#endregion
26
27		#region RequiredShaderFeatures (Public)
28		/// <summary>
29		/// Which shader feature flags are required for this ShaderFeature.
30		/// Very important for creating of a new ShaderFeature.
31		/// </summary>
32		public ShaderFeatureFlags RequiredShaderFeatures
33		{
34			get
35			{
36				return ShaderFeatureFlags.Basic;
37			}
38		}
39		#endregion
40
41		#region Parameters (Public)
42		/// <summary>
43		/// Parameters as a dictionary, will be generated on the fly when
44		/// requested.
45		/// </summary>
46		public Dictionary<string, object> Parameters
47		{
48			get
49			{
50				return new Dictionary<string, object>();
51			}
52		}
53		#endregion
54
55		#region Constructors
56		/// <summary>
57		/// Create basic shader feature
58		/// </summary>
59		public NoTexturingShaderFeature()
60		{
61		}
62
63		/// <summary>
64		/// Create basic shader feature and load automatically
65		/// the ShaderFeatures from a binary data stream.
66		/// </summary>
67		public NoTexturingShaderFeature(BinaryReader reader)
68		{
69			Load(reader);
70		}
71		#endregion
72
73		#region ISaveLoadBinary Members
74		/// <summary>
75		/// Load this ShaderFeature from a binary data stream.
76		/// </summary>
77		public void Load(BinaryReader reader)
78		{
79		}
80
81		/// <summary>
82		/// Save this ShaderFeature to a binary data stream.
83		/// </summary>
84		public void Save(BinaryWriter writer)
85		{
86		}
87		#endregion
88	}
89}