PageRenderTime 34ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/Utilities/Graphics/ShaderFeatures/VertexCompressionShaderFeature.cs

#
C# | 90 lines | 52 code | 7 blank | 31 comment | 0 complexity | c52fe35ba90b5396c136c39b96d7e8f6 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. /// Vertex compression shader feature helper class. Defines nothing, just
  7. /// the flag, which is used to make the exported shader use compression
  8. /// in the vertex format specified for it.
  9. /// </summary>
  10. public class VertexCompressionShaderFeature : 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.VertexCompression;
  23. }
  24. }
  25. #endregion
  26. #region RequiredShaderFeatures (Public)
  27. /// <summary>
  28. /// Which shader feature flags are required for this ShaderFeature.
  29. /// Very important for creating of a new ShaderFeature.
  30. /// </summary>
  31. public ShaderFeatureFlags RequiredShaderFeatures
  32. {
  33. get
  34. {
  35. return ShaderFeatureFlags.Basic;
  36. }
  37. }
  38. #endregion
  39. #region Parameters (Public)
  40. /// <summary>
  41. /// Parameters as a dictionary, will be generated on the fly when
  42. /// requested.
  43. /// </summary>
  44. public Dictionary<string, object> Parameters
  45. {
  46. get
  47. {
  48. return new Dictionary<string, object>();
  49. }
  50. }
  51. #endregion
  52. #region Constructors
  53. /// <summary>
  54. /// Create compressed vertices shader feature.
  55. /// </summary>
  56. public VertexCompressionShaderFeature()
  57. {
  58. }
  59. /// <summary>
  60. /// Create compressed vertices shader feature and load automatically
  61. /// the ShaderFeatures from a binary data stream.
  62. /// </summary>
  63. public VertexCompressionShaderFeature(BinaryReader reader)
  64. {
  65. Load(reader);
  66. }
  67. #endregion
  68. #region ISaveLoadBinary Members
  69. /// <summary>
  70. /// Load this ShaderFeature from a binary data stream.
  71. /// </summary>
  72. public void Load(BinaryReader reader)
  73. {
  74. }
  75. /// <summary>
  76. /// Save this ShaderFeature to a binary data stream.
  77. /// </summary>
  78. public void Save(BinaryWriter writer)
  79. {
  80. }
  81. #endregion
  82. }
  83. }