BsScriptTexture.h 1.5 KB

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