BsShaderInclude.h 1.2 KB

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