BsD3D9TextureManager.h 1.7 KB

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