BsShaderDefines.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. namespace BansheeEngine
  6. {
  7. /** @addtogroup Material-Internal
  8. * @{
  9. */
  10. /** Allows you to specify defines that can control shader compilation. */
  11. class BS_CORE_EXPORT ShaderDefines
  12. {
  13. public:
  14. /** Adds a new define with a floating point value. */
  15. void set(const String& name, float value);
  16. /** Adds a new define with an integer value. */
  17. void set(const String& name, INT32 value);
  18. /** Adds a new define with an integer value. */
  19. void set(const String& name, UINT32 value);
  20. /** Adds a new define with a string point value. */
  21. void set(const String& name, const String& value);
  22. /** Returns a list of all defines. */
  23. UnorderedMap<String, String> getAll() const { return mDefines; }
  24. /** Removes all defines. */
  25. void clear() { mDefines.clear(); }
  26. protected:
  27. UnorderedMap<String, String> mDefines;
  28. };
  29. /** @} */
  30. }