2
0

BsScriptTexture.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. /** @addtogroup ScriptInteropEngine
  11. * @{
  12. */
  13. /** Base class for all interop objects referencing textures. */
  14. class BS_SCR_BE_EXPORT ScriptTextureBase : public ScriptResourceBase
  15. {
  16. protected:
  17. friend class ScriptResourceManager;
  18. ScriptTextureBase(MonoObject* instance)
  19. :ScriptResourceBase(instance)
  20. { }
  21. virtual ~ScriptTextureBase() {}
  22. };
  23. /** Interop class between C++ & CLR for Texture. */
  24. class BS_SCR_BE_EXPORT ScriptTexture : public ScriptObject <ScriptTexture, ScriptTextureBase>
  25. {
  26. public:
  27. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Texture")
  28. private:
  29. ScriptTexture(MonoObject* instance);
  30. /************************************************************************/
  31. /* CLR HOOKS */
  32. /************************************************************************/
  33. static void internal_getPixelFormat(ScriptTexture* thisPtr, PixelFormat* value);
  34. static void internal_getUsage(ScriptTexture* thisPtr, TextureUsage* value);
  35. static void internal_getWidth(ScriptTexture* thisPtr, int* value);
  36. static void internal_getHeight(ScriptTexture* thisPtr, int* value);
  37. static void internal_getGammaCorrection(ScriptTexture* thisPtr, bool* value);
  38. static void internal_getSampleCount(ScriptTexture* thisPtr, int* value);
  39. static void internal_getMipmapCount(ScriptTexture* thisPtr, int* value);
  40. };
  41. /** @} */
  42. }