[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / rendering / gl / GLShader.h
blob8355043281c28f469c5651486ff560f8b66e184f
1 /*
2 * Copyright (C) 2005-2024 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 "guilib/Shader.h"
13 #include <string>
15 class CGLShader : public Shaders::CGLSLShaderProgram
17 public:
18 CGLShader(const char* shader, const std::string& prefix);
19 CGLShader(const char* vshader, const char* fshader, const std::string& prefix);
20 void OnCompiledAndLinked() override;
21 bool OnEnabled() override;
22 void Free();
24 GLint GetPosLoc() {return m_hPos;}
25 GLint GetColLoc() {return m_hCol;}
26 GLint GetCord0Loc() {return m_hCord0;}
27 GLint GetCord1Loc() {return m_hCord1;}
28 GLint GetDepthLoc() { return m_hDepth; }
29 GLint GetUniColLoc() {return m_hUniCol;}
30 GLint GetModelLoc() {return m_hModel; }
31 GLint GetMatrixLoc() { return m_hMatrix; }
32 GLint GetShaderClipLoc() { return m_hShaderClip; }
33 GLint GetShaderCoordStepLoc() { return m_hCoordStep; }
34 bool HardwareClipIsPossible() {return m_clipPossible; }
35 GLfloat GetClipXFactor() {return m_clipXFactor; }
36 GLfloat GetClipXOffset() {return m_clipXOffset; }
37 GLfloat GetClipYFactor() {return m_clipYFactor; }
38 GLfloat GetClipYOffset() {return m_clipYOffset; }
40 protected:
41 GLint m_hTex0 = 0;
42 GLint m_hTex1 = 0;
43 GLint m_hUniCol = 0;
44 GLint m_hProj = 0;
45 GLint m_hModel = 0;
46 GLint m_hMatrix{0}; // m_hProj * m_hModel
47 GLint m_hShaderClip{0}; // clipping rect vec4(x1,y1,x2,y2)
48 GLint m_hCoordStep{0}; // step (1/resolution) for the two textures vec4(t1.x,t1.y,t2.x,t2.y)
49 GLint m_hPos = 0;
50 GLint m_hCol = 0;
51 GLint m_hCord0 = 0;
52 GLint m_hCord1 = 0;
53 GLint m_hDepth = 0;
55 const GLfloat *m_proj = nullptr;
56 const GLfloat *m_model = nullptr;
58 bool m_clipPossible = false;
59 GLfloat m_clipXFactor;
60 GLfloat m_clipXOffset;
61 GLfloat m_clipYFactor;
62 GLfloat m_clipYOffset;