summaryrefslogtreecommitdiff
path: root/include/llmr/renderer/shader-point.hpp
blob: 1de38504cf06716f5f3f1c7de7f0d23eb8379109 (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
#ifndef LLMR_RENDERER_SHADER_POINT
#define LLMR_RENDERER_SHADER_POINT

#include "shader.hpp"

namespace llmr {

class PointShader : public Shader {
public:
    PointShader();

    void bind(char *offset);

    void setImage(int32_t image);
    void setColor(const std::array<float, 4>& color);
    void setPointTopLeft(const std::array<float, 2>& point_tl);
    void setPointBottomRight(const std::array<float, 2>& point_br);
    void setSize(float size);

private:
    int32_t a_pos = -1;

    int32_t image = -1;
    int32_t u_image = -1;

    std::array<float, 4> color = {};
    int32_t u_color = -1;

    std::array<float, 2> point_tl = {};
    int32_t u_point_tl = -1;

    std::array<float, 2> point_br = {};
    int32_t u_point_br = -1;

    float size = 0;
    int32_t u_size = -1;
};

}

#endif