BsShaderInclude.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsResource.h"
  6. namespace BansheeEngine
  7. {
  8. /** @addtogroup Resources
  9. * @{
  10. */
  11. /** Raw text resource that serves as an include file for shaders. */
  12. class BS_CORE_EXPORT ShaderInclude : public Resource
  13. {
  14. public:
  15. /** Text of the include file. */
  16. const String& getString() const { return mString; }
  17. /** Creates a new include file resource with the specified include string. */
  18. static HShaderInclude create(const String& includeString);
  19. public: // ***** INTERNAL ******
  20. /** @name Internal
  21. * @{
  22. */
  23. /**
  24. * Creates an include file resource with the specified include string.
  25. *
  26. * @note Internal method. Use create() for normal use.
  27. */
  28. static ShaderIncludePtr _createPtr(const String& includeString);
  29. /** @} */
  30. private:
  31. ShaderInclude(const String& includeString);
  32. String mString;
  33. /************************************************************************/
  34. /* SERIALIZATION */
  35. /************************************************************************/
  36. public:
  37. friend class ShaderIncludeRTTI;
  38. static RTTITypeBase* getRTTIStatic();
  39. virtual RTTITypeBase* getRTTI() const override;
  40. };
  41. /** @} */
  42. }