CmD3D11TextureManager.cpp 958 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "CmD3D11TextureManager.h"
  2. #include "CmD3D11Texture.h"
  3. #include "CmD3D11RenderTexture.h"
  4. #include "CmD3D11Mappings.h"
  5. #include "CmD3D11RenderSystem.h"
  6. #include "CmD3D11MultiRenderTexture.h"
  7. namespace CamelotEngine
  8. {
  9. D3D11TextureManager::D3D11TextureManager()
  10. :TextureManager()
  11. { }
  12. D3D11TextureManager::~D3D11TextureManager()
  13. { }
  14. Texture* D3D11TextureManager::createTextureImpl()
  15. {
  16. return new D3D11Texture();
  17. }
  18. RenderTexture* D3D11TextureManager::createRenderTextureImpl()
  19. {
  20. return new D3D11RenderTexture();
  21. }
  22. MultiRenderTexture* D3D11TextureManager::createMultiRenderTextureImpl()
  23. {
  24. return new D3D11MultiRenderTexture();
  25. }
  26. PixelFormat D3D11TextureManager::getNativeFormat(TextureType ttype, PixelFormat format, int usage)
  27. {
  28. // Basic filtering
  29. DXGI_FORMAT d3dPF = D3D11Mappings::_getPF(D3D11Mappings::_getClosestSupportedPF(format));
  30. return D3D11Mappings::_getPF(d3dPF);
  31. }
  32. }