BsShaderInclude.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. /** @cond INTERNAL */
  21. /**
  22. * Creates an include file resource with the specified include string.
  23. *
  24. * @note Internal method. Use create() for normal use.
  25. */
  26. static ShaderIncludePtr _createPtr(const String& includeString);
  27. /** @endcond */
  28. private:
  29. ShaderInclude(const String& includeString);
  30. String mString;
  31. /************************************************************************/
  32. /* SERIALIZATION */
  33. /************************************************************************/
  34. public:
  35. friend class ShaderIncludeRTTI;
  36. static RTTITypeBase* getRTTIStatic();
  37. virtual RTTITypeBase* getRTTI() const override;
  38. };
  39. /** @} */
  40. }