BsGpuProgramImportOptions.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //__________________________ Banshee Project - A modern game development toolkit _________________________________//
  2. //_____________________________________ www.banshee-project.com __________________________________________________//
  3. //________________________ Copyright (c) 2014 Marko Pintera. All rights reserved. ________________________________//
  4. #pragma once
  5. #include "BsCorePrerequisites.h"
  6. #include "BsImportOptions.h"
  7. #include "BsGpuProgram.h"
  8. namespace BansheeEngine
  9. {
  10. /**
  11. * @brief Contains import options you may use to control how is a GPU program (i.e. shader)
  12. * file imported.
  13. */
  14. class BS_CORE_EXPORT GpuProgramImportOptions : public ImportOptions
  15. {
  16. public:
  17. GpuProgramImportOptions();
  18. /**
  19. * @brief Sets the name of the GPU program entry point method (e.g. "main").
  20. */
  21. void setEntryPoint(const String& entryPoint) { mEntryPoint = entryPoint; }
  22. /**
  23. * @brief Sets the language the GPU program is written in (e.g. HLSL9, GLSL, HLSL11).
  24. */
  25. void setLanguage(const String& language) { mLanguage = language; }
  26. /**
  27. * @brief Sets GPU program profile. Determines minimal feature-set the GPU program
  28. * requires in order to function.
  29. */
  30. void setProfile(GpuProgramProfile profile) { mProfile = profile; }
  31. /**
  32. * @brief Sets GPU program type (e.g. vertex, pixel, etc.).
  33. */
  34. void setType(GpuProgramType type) { mType = type; }
  35. /**
  36. * @brief Sets optional GPU program include files which may be used
  37. * for sharing code across multiple programs.
  38. */
  39. void setIncludes(const Vector<HGpuProgInclude>& includes) { mIncludes = includes; }
  40. /**
  41. * @brief Gets the name of the GPU program entry point method (e.g. "main").
  42. */
  43. const String& getEntryPoint() const { return mEntryPoint; }
  44. /**
  45. * @brief Gets the language the GPU program is written in (e.g. HLSL9, GLSL, HLSL11).
  46. */
  47. const String& getLanguage() const { return mLanguage; }
  48. /**
  49. * @brief Gets GPU program profile. Determines minimal feature-set the GPU program
  50. * requires in order to function.
  51. */
  52. GpuProgramProfile getProfile() const { return mProfile; }
  53. /**
  54. * @brief Gets GPU program type (e.g. vertex, pixel, etc.).
  55. */
  56. GpuProgramType getType() const { return mType; }
  57. /**
  58. * @brief Gets optional GPU program include files which may be used
  59. * for sharing code across multiple programs.
  60. */
  61. const Vector<HGpuProgInclude>& getIncludes() const { return mIncludes; }
  62. /************************************************************************/
  63. /* SERIALIZATION */
  64. /************************************************************************/
  65. public:
  66. friend class GpuProgramImportOptionsRTTI;
  67. static RTTITypeBase* getRTTIStatic();
  68. virtual RTTITypeBase* getRTTI() const;
  69. private:
  70. String mEntryPoint;
  71. String mLanguage;
  72. GpuProgramProfile mProfile;
  73. GpuProgramType mType;
  74. Vector<HGpuProgInclude> mIncludes;
  75. };
  76. }