Merge pull request #26273 from 78andyp/blurayfixes2
[xbmc.git] / xbmc / cores / RetroPlayer / buffers / RenderBufferOpenGL.h
blob9fcb9e2709825db7c2ea5fba62ea39ba053e3431
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "cores/RetroPlayer/buffers/video/RenderBufferSysMem.h"
13 #include "system_gl.h"
15 namespace KODI
17 namespace RETRO
19 class CRenderContext;
21 class CRenderBufferOpenGL : public CRenderBufferSysMem
23 public:
24 CRenderBufferOpenGL(GLuint pixeltype, GLuint internalformat, GLuint pixelformat, GLuint bpp);
25 ~CRenderBufferOpenGL() override;
27 bool UploadTexture() override;
28 GLuint TextureID() const { return m_textureId; }
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;
37 const GLenum m_textureTarget = GL_TEXTURE_2D; //! @todo
38 GLuint m_textureId = 0;
40 void CreateTexture();
41 void DeleteTexture();
43 } // namespace RETRO
44 } // namespace KODI