Debian Codegraph @

xbmc/cores/RetroPlayer/buffers/RenderBufferOpenGLES.h

raw
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 "cores/RetroPlayer/buffers/video/RenderBufferSysMem.h"
12
13 #include "system_gl.h"
14
15 namespace KODI
16 {
17 namespace RETRO
18 {
19 class CRenderContext;
20
21 class CRenderBufferOpenGLES : public CRenderBufferSysMem
22 {
23 public:
24 CRenderBufferOpenGLES(CRenderContext& context,
25 GLuint pixeltype,
26 GLuint internalformat,
27 GLuint pixelformat,
28 GLuint bpp);
29 ~CRenderBufferOpenGLES() override;
30
31 // implementation of IRenderBuffer via CRenderBufferSysMem
32 bool UploadTexture() override;
33
34 GLuint TextureID() const { return m_textureId; }
35
36 private:
37 // Construction parameters
38 CRenderContext& m_context;
39 const GLuint m_pixeltype;
40 const GLuint m_internalformat;
41 const GLuint m_pixelformat;
42 const GLuint m_bpp;
43
44 const GLenum m_textureTarget = GL_TEXTURE_2D; //! @todo
45 GLuint m_textureId = 0;
46
47 void CreateTexture();
48 void DeleteTexture();
49 };
50 } // namespace RETRO
51 } // namespace KODI