BsShaderDefines.h 1.1 KB

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