kodi
GLSLOutput.h
1 /*
2  * Copyright (C) 2007-2018 Team Kodi
3  * Copyright (C) 2015 Lauri Mylläri
4  * This file is part of Kodi - https://kodi.tv
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  * See LICENSES/README.md for more information.
8  */
9 
10 #pragma once
11 
12 #include "utils/GLUtils.h"
13 
14 #include <string>
15 
16 namespace Shaders
17 {
18  class GLSLOutput
19  {
20  public:
21  // take the 1st available texture unit as a parameter
22  GLSLOutput(
23  int texunit,
24  bool useDithering,
25  unsigned int ditherDepth,
26  bool fullrange,
27  GLuint clutTex,
28  int clutSize);
29  std::string GetDefines();
30  void OnCompiledAndLinked(GLuint programHandle);
31  bool OnEnabled();
32  void OnDisabled();
33  void Free();
34 
35  private:
36  void FreeTextures();
37 
38  bool m_dither;
39  unsigned int m_ditherDepth;
40  bool m_fullRange;
41  bool m_3DLUT;
42  // first texture unit available to us
43  int m_1stTexUnit;
44  int m_uDither;
45  int m_uCLUT;
46  int m_uCLUTSize;
47 
48  // defines
49 
50  // attribute locations
51  GLint m_hDither = -1;
52  GLint m_hDitherQuant = -1;
53  GLint m_hDitherSize = -1;
54  GLint m_hCLUT = -1;
55  GLint m_hCLUTSize = -1;
56 
57  // textures
58  GLuint m_tDitherTex = 0;
59  GLuint m_tCLUTTex;
60  };
61 }
Definition: LinuxRendererGL.h:30
void OnCompiledAndLinked(GLuint programHandle)
Definition: GLSLOutput.cpp:54
Definition: GLSLOutput.h:18