BsShaderInclude.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include "BsCorePrerequisites.h"
  3. #include "BsResource.h"
  4. namespace BansheeEngine
  5. {
  6. /**
  7. * @brief Raw text resource that serves as an include file for shaders.
  8. */
  9. class BS_CORE_EXPORT ShaderInclude : public Resource
  10. {
  11. public:
  12. /**
  13. * @brief Text of the include file.
  14. */
  15. const String& getString() const { return mString; }
  16. /**
  17. * @brief Creates a new include file resource with the specified include string.
  18. */
  19. static HShaderInclude create(const String& includeString);
  20. /**
  21. * @brief Creates an include file resource with the specified include string.
  22. *
  23. * @note Internal method. Use "create" for normal use.
  24. */
  25. static ShaderIncludePtr _createPtr(const String& includeString);
  26. private:
  27. ShaderInclude(const String& includeString);
  28. String mString;
  29. /************************************************************************/
  30. /* SERIALIZATION */
  31. /************************************************************************/
  32. public:
  33. friend class ShaderIncludeRTTI;
  34. static RTTITypeBase* getRTTIStatic();
  35. virtual RTTITypeBase* getRTTI() const override;
  36. };
  37. }