BsGLTextureManager.h 993 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include "BsGLPrerequisites.h"
  3. #include "BsGLTexture.h"
  4. #include "BsGLSupport.h"
  5. #include "BsTextureManager.h"
  6. namespace BansheeEngine
  7. {
  8. /**
  9. * @brief Handles creation of OpenGL textures.
  10. */
  11. class BS_RSGL_EXPORT GLTextureManager : public TextureManager
  12. {
  13. public:
  14. GLTextureManager(GLSupport& support);
  15. virtual ~GLTextureManager();
  16. /**
  17. * @brief Converts the provided format for the specified texture type and usage
  18. * into a format that is supported by OpenGL.
  19. */
  20. PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage);
  21. protected:
  22. /**
  23. * @copydoc TextureManager::createTextureImpl
  24. */
  25. TexturePtr createTextureImpl();
  26. /**
  27. * @copydoc TextureManager::createRenderTextureImpl
  28. */
  29. RenderTexturePtr createRenderTextureImpl();
  30. /**
  31. * @copydoc TextureManager::createMultiRenderTextureImpl
  32. */
  33. MultiRenderTexturePtr createMultiRenderTextureImpl();
  34. GLSupport& mGLSupport;
  35. };
  36. }