PageRenderTime 54ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/Utilities/Graphics/ShaderFeatures/NoTexturingShaderFeature.cs

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