2
0

BsScriptTextureCube.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 a cube Texture. */
  14. class BS_SCR_BE_EXPORT ScriptTextureCube : public TScriptResource <ScriptTextureCube, Texture>
  15. {
  16. public:
  17. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "TextureCube")
  18. private:
  19. friend class ScriptResourceManager;
  20. ScriptTextureCube(MonoObject* instance, const HTexture& texture);
  21. /** Creates an empty, uninitialized managed instance of the resource interop object. */
  22. static MonoObject* createInstance();
  23. /************************************************************************/
  24. /* CLR HOOKS */
  25. /************************************************************************/
  26. static void internal_createInstance(MonoObject* instance, PixelFormat format, UINT32 width,
  27. UINT32 height, TextureUsage usage, UINT32 numSamples, bool hasMipmaps, bool gammaCorrection);
  28. static MonoObject* internal_getPixels(ScriptTextureCube* thisPtr, UINT32 face, UINT32 mipLevel);
  29. static MonoObject* internal_getGPUPixels(ScriptTextureCube* thisPtr, UINT32 face, UINT32 mipLevel);
  30. static void internal_setPixels(ScriptTextureCube* thisPtr, MonoObject* data, UINT32 face, UINT32 mipLevel);
  31. };
  32. /** @} */
  33. }