BsD3D9TextureManager.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. /**
  10. * @brief Handles creation of DirectX 9 textures.
  11. */
  12. class BS_D3D9_EXPORT D3D9TextureManager : public TextureManager
  13. {
  14. public:
  15. D3D9TextureManager();
  16. ~D3D9TextureManager();
  17. /**
  18. * @copydoc TextureManager::getNativeFormat
  19. */
  20. PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage, bool hwGamma) override;
  21. protected:
  22. /**
  23. * @copydoc TextureManager::createRenderTextureImpl
  24. */
  25. RenderTexturePtr createRenderTextureImpl(const RENDER_TEXTURE_DESC& desc) override;
  26. /**
  27. * @copydoc TextureManager::createMultiRenderTextureImpl
  28. */
  29. MultiRenderTexturePtr createMultiRenderTextureImpl(const MULTI_RENDER_TEXTURE_DESC& desc) override;
  30. };
  31. /**
  32. * @brief Handles creation of DirectX 9 textures.
  33. */
  34. class BS_D3D9_EXPORT D3D9TextureCoreManager : public TextureCoreManager
  35. {
  36. protected:
  37. /**
  38. * @copydoc TextureCoreManager::createTextureInternal
  39. */
  40. SPtr<TextureCore> createTextureInternal(TextureType texType, UINT32 width, UINT32 height, UINT32 depth,
  41. int numMips, PixelFormat format, int usage = TU_DEFAULT, bool hwGammaCorrection = false,
  42. UINT32 multisampleCount = 0, const PixelDataPtr& initialData = nullptr) override;
  43. /**
  44. * @copydoc TextureCoreManager::createRenderTextureInternal
  45. */
  46. SPtr<RenderTextureCore> createRenderTextureInternal(const RENDER_TEXTURE_CORE_DESC& desc) override;
  47. /**
  48. * @copydoc TextureCoreManager::createMultiRenderTextureInternal
  49. */
  50. SPtr<MultiRenderTextureCore> createMultiRenderTextureInternal(const MULTI_RENDER_TEXTURE_CORE_DESC& desc) override;
  51. };
  52. }