BsD3D9TextureManager.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsD3D9Prerequisites.h"
  5. #include "BsD3D9Texture.h"
  6. #include "BsTextureManager.h"
  7. namespace BansheeEngine
  8. {
  9. /** @addtogroup D3D9
  10. * @{
  11. */
  12. /** Handles creation of DirectX 9 textures. */
  13. class BS_D3D9_EXPORT D3D9TextureManager : public TextureManager
  14. {
  15. public:
  16. D3D9TextureManager();
  17. ~D3D9TextureManager();
  18. /** @copydoc TextureManager::getNativeFormat */
  19. PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage, bool hwGamma) override;
  20. protected:
  21. /** @copydoc TextureManager::createRenderTextureImpl */
  22. SPtr<RenderTexture> createRenderTextureImpl(const RENDER_TEXTURE_DESC& desc) override;
  23. /** @copydoc TextureManager::createMultiRenderTextureImpl */
  24. SPtr<MultiRenderTexture> createMultiRenderTextureImpl(const MULTI_RENDER_TEXTURE_DESC& desc) override;
  25. };
  26. /** Handles creation of DirectX 9 textures. */
  27. class BS_D3D9_EXPORT D3D9TextureCoreManager : public TextureCoreManager
  28. {
  29. protected:
  30. /** @copydoc TextureCoreManager::createTextureInternal */
  31. SPtr<TextureCore> createTextureInternal(TextureType texType, UINT32 width, UINT32 height, UINT32 depth,
  32. int numMips, PixelFormat format, int usage = TU_DEFAULT, bool hwGammaCorrection = false,
  33. UINT32 multisampleCount = 0, UINT32 numArraySlices = 1, const SPtr<PixelData>& initialData = nullptr) override;
  34. /** @copydoc TextureCoreManager::createRenderTextureInternal */
  35. SPtr<RenderTextureCore> createRenderTextureInternal(const RENDER_TEXTURE_CORE_DESC& desc) override;
  36. /** @copydoc TextureCoreManager::createMultiRenderTextureInternal */
  37. SPtr<MultiRenderTextureCore> createMultiRenderTextureInternal(const MULTI_RENDER_TEXTURE_CORE_DESC& desc) override;
  38. };
  39. /** @} */
  40. }