aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/Shader.hpp
blob: 33bcdca39d4cfc6eb533718fd0e3b8c8ac23f5aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once

#include "../defines.hpp"
#include <unordered_map>

class CShader {
  public:
    ~CShader();

    GLuint program = 0;
    GLint  proj;
    GLint  color;
    GLint  tex;
    GLint  alpha;
    GLint  posAttrib;
    GLint  texAttrib;
    GLint  discardOpaque;
    GLint  discardAlphaZero;

    GLint  topLeft;
    GLint  bottomRight;
    GLint  fullSize;
    GLint  fullSizeUntransformed;
    GLint  radius;
    GLint  primitiveMultisample;

    GLint  thick;

    GLint  halfpixel;

    GLint  range;
    GLint  shadowPower;

    GLint  applyTint;
    GLint  tint;

    GLint  gradient;
    GLint  gradientLength;
    GLint  angle;

    GLint  time;

    GLint  getUniformLocation(const std::string&);

    void   destroy();

  private:
    std::unordered_map<std::string, GLint> m_muUniforms;
};