BsScriptTexture3D.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 "BsScriptTexture.h"
  6. #include "BsScriptObject.h"
  7. #include "BsTexture.h"
  8. namespace BansheeEngine
  9. {
  10. /** @addtogroup ScriptInteropEngine
  11. * @{
  12. */
  13. /** Interop class between C++ & CLR for 3D Texture. */
  14. class BS_SCR_BE_EXPORT ScriptTexture3D : public TScriptResource <ScriptTexture3D, Texture>
  15. {
  16. public:
  17. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Texture3D")
  18. private:
  19. friend class ScriptResourceManager;
  20. ScriptTexture3D(MonoObject* instance, const HTexture& texture);
  21. /**
  22. * @brief Creates an empty, uninitialized managed instance of the resource interop object.
  23. */
  24. static MonoObject* createInstance();
  25. /************************************************************************/
  26. /* CLR HOOKS */
  27. /************************************************************************/
  28. static void internal_createInstance(MonoObject* instance, PixelFormat format, UINT32 width,
  29. UINT32 height, UINT32 depth, TextureUsage usage, bool hasMipmaps, bool gammaCorrection);
  30. static MonoObject* internal_getPixels(ScriptTexture3D* thisPtr, UINT32 mipLevel);
  31. static MonoObject* internal_getGPUPixels(ScriptTexture3D* thisPtr, UINT32 mipLevel);
  32. static void internal_setPixels(ScriptTexture3D* thisPtr, MonoObject* data, UINT32 mipLevel);
  33. };
  34. /** @} */
  35. }