Debian Codegraph @

xbmc/cores/RetroPlayer/buffers/RenderBufferOpenGL.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 CRenderBufferOpenGL : public CRenderBufferSysMem
22 {
23 public:
24 CRenderBufferOpenGL(GLuint pixeltype, GLuint internalformat, GLuint pixelformat, GLuint bpp);
25 ~CRenderBufferOpenGL() override;
26
27 bool UploadTexture() override;
28 GLuint TextureID() const { return m_textureId; }
29
30 private:
31 // Construction parameters
32 const GLuint m_pixeltype;
33 const GLuint m_internalformat;
34 const GLuint m_pixelformat;
35 const GLuint m_bpp;
36
37 const GLenum m_textureTarget = GL_TEXTURE_2D; //! @todo
38 GLuint m_textureId = 0;
39
40 void CreateTexture();
41 void DeleteTexture();
42 };
43 } // namespace RETRO
44 } // namespace KODI