1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
3 | #pragma once |
4 | |
5 | #include "BsGLPrerequisites.h" |
6 | #include "RenderAPI/BsTextureView.h" |
7 | |
8 | namespace bs { namespace ct |
9 | { |
10 | /** @addtogroup GL |
11 | * @{ |
12 | */ |
13 | |
14 | /** OpenGL implementation of a texture resource view. */ |
15 | class GLTextureView : public TextureView |
16 | { |
17 | public: |
18 | ~GLTextureView(); |
19 | |
20 | /** Returns internal OpenGL texture view handle. */ |
21 | GLuint getGLID() const { return mViewID; } |
22 | |
23 | /** Returns OpenGL texture target type. */ |
24 | GLuint getGLTextureTarget() const { return mTarget; } |
25 | |
26 | protected: |
27 | friend class GLTexture; |
28 | |
29 | GLTextureView(const GLTexture* texture, const TEXTURE_VIEW_DESC& desc); |
30 | private: |
31 | GLuint mViewID = 0; |
32 | GLuint mTarget; |
33 | }; |
34 | |
35 | /** @} */ |
36 | }} |