[WASAPI] fix stream types and frequencies enumeration
[xbmc.git] / xbmc / guilib / TextureGL.h
blobcc3e41b179fb3f53ffdeb5aa29a48e18dd25103d
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 "Texture.h"
13 #include "system_gl.h"
15 struct TextureFormat
17 GLenum internalFormat{GL_FALSE};
18 GLenum internalFormatSRGB{GL_FALSE};
19 GLint format{GL_FALSE};
20 GLenum type{GL_UNSIGNED_BYTE};
23 struct Textureswizzle
25 GLint r{GL_RED};
26 GLint g{GL_GREEN};
27 GLint b{GL_BLUE};
28 GLint a{GL_ALPHA};
31 /************************************************************************/
32 /* CGLTexture */
33 /************************************************************************/
34 class CGLTexture : public CTexture
36 public:
37 CGLTexture(unsigned int width = 0, unsigned int height = 0, XB_FMT format = XB_FMT_A8R8G8B8);
38 ~CGLTexture() override;
40 void CreateTextureObject() override;
41 void DestroyTextureObject() override;
42 void LoadToGPU() override;
43 void SyncGPU() override;
44 void BindToUnit(unsigned int unit) override;
46 bool SupportsFormat(KD_TEX_FMT textureFormat, KD_TEX_SWIZ textureSwizzle) override
48 return true;
51 protected:
52 void SetSwizzle();
53 TextureFormat GetFormatGL(KD_TEX_FMT textureFormat);
55 GLuint m_texture{0};
56 bool m_isOglVersion3orNewer{false};
57 bool m_isOglVersion33orNewer{false};