BsGLTextureManager.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //__________________________ Banshee Project - A modern game development toolkit _________________________________//
  2. //_____________________________________ www.banshee-project.com __________________________________________________//
  3. //________________________ Copyright (c) 2014 Marko Pintera. All rights reserved. ________________________________//
  4. #pragma once
  5. #include "BsGLPrerequisites.h"
  6. #include "BsGLTexture.h"
  7. #include "BsGLSupport.h"
  8. #include "BsTextureManager.h"
  9. namespace BansheeEngine
  10. {
  11. /**
  12. * @brief Handles creation of OpenGL textures.
  13. */
  14. class BS_RSGL_EXPORT GLTextureManager : public TextureManager
  15. {
  16. public:
  17. GLTextureManager(GLSupport& support);
  18. virtual ~GLTextureManager();
  19. /**
  20. * @brief Converts the provided format for the specified texture type and usage
  21. * into a format that is supported by OpenGL.
  22. */
  23. PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage, bool hwGamma);
  24. protected:
  25. /**
  26. * @copydoc TextureManager::createTextureImpl
  27. */
  28. TexturePtr createTextureImpl();
  29. /**
  30. * @copydoc TextureManager::createRenderTextureImpl
  31. */
  32. RenderTexturePtr createRenderTextureImpl();
  33. /**
  34. * @copydoc TextureManager::createMultiRenderTextureImpl
  35. */
  36. MultiRenderTexturePtr createMultiRenderTextureImpl();
  37. GLSupport& mGLSupport;
  38. };
  39. }