BsScriptTexture.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEnginePrerequisites.h"
  5. #include "BsScriptResource.h"
  6. #include "BsPixelData.h"
  7. #include "BsTexture.h"
  8. namespace BansheeEngine
  9. {
  10. /**
  11. * @brief Base class for all interop objects referencing textures.
  12. */
  13. class BS_SCR_BE_EXPORT ScriptTextureBase : public ScriptResourceBase
  14. {
  15. protected:
  16. friend class ScriptResourceManager;
  17. ScriptTextureBase(MonoObject* instance)
  18. :ScriptResourceBase(instance)
  19. { }
  20. virtual ~ScriptTextureBase() {}
  21. };
  22. /**
  23. * @brief Interop class between C++ & CLR for Texture.
  24. */
  25. class BS_SCR_BE_EXPORT ScriptTexture : public ScriptObject <ScriptTexture, ScriptTextureBase>
  26. {
  27. public:
  28. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Texture")
  29. private:
  30. ScriptTexture(MonoObject* instance);
  31. /************************************************************************/
  32. /* CLR HOOKS */
  33. /************************************************************************/
  34. static void internal_getPixelFormat(ScriptTexture* thisPtr, PixelFormat* value);
  35. static void internal_getUsage(ScriptTexture* thisPtr, TextureUsage* value);
  36. static void internal_getWidth(ScriptTexture* thisPtr, int* value);
  37. static void internal_getHeight(ScriptTexture* thisPtr, int* value);
  38. static void internal_getGammaCorrection(ScriptTexture* thisPtr, bool* value);
  39. static void internal_getSampleCount(ScriptTexture* thisPtr, int* value);
  40. static void internal_getMipmapCount(ScriptTexture* thisPtr, int* value);
  41. };
  42. }