xbmc
TextureGL.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "Texture.h"
12 
13 #include "system_gl.h"
14 
15 /************************************************************************/
16 /* CGLTexture */
17 /************************************************************************/
18 class CGLTexture : public CTexture
19 {
20 public:
21  CGLTexture(unsigned int width = 0,
22  unsigned int height = 0,
23  XB_FMT format = XB_FMT_A8R8G8B8,
24  GLuint texture = 0);
25  ~CGLTexture() override;
26 
27  void CreateTextureObject() override;
28  void DestroyTextureObject() override;
29  void LoadToGPU() override;
30  void BindToUnit(unsigned int unit) override;
31 
32  GLuint getMTexture() const;
33 
34 protected:
35  GLuint m_texture = 0;
36  bool m_isOglVersion3orNewer = false;
37 };
38 
Base texture class, subclasses of which depend on the render spec (DX, GL etc.)
Definition: Texture.h:34
Definition: TextureGL.h:18