BsGLTextureView.h 909 B

123456789101112131415161718192021222324252627282930313233343536
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsGLPrerequisites.h"
  5. #include "RenderAPI/BsTextureView.h"
  6. namespace bs { namespace ct
  7. {
  8. /** @addtogroup GL
  9. * @{
  10. */
  11. /** OpenGL implementation of a texture resource view. */
  12. class GLTextureView : public TextureView
  13. {
  14. public:
  15. ~GLTextureView();
  16. /** Returns internal OpenGL texture view handle. */
  17. GLuint getGLID() const { return mViewID; }
  18. /** Returns OpenGL texture target type. */
  19. GLuint getGLTextureTarget() const { return mTarget; }
  20. protected:
  21. friend class GLTexture;
  22. GLTextureView(const GLTexture* texture, const TEXTURE_VIEW_DESC& desc);
  23. private:
  24. GLuint mViewID;
  25. GLuint mTarget;
  26. };
  27. /** @} */
  28. }}