blob: f4713c59f620f139b4f869b427d4ccbcfb7be266 (
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
|
#ifndef LLMR_RENDERER_SHADER
#define LLMR_RENDERER_SHADER
#include <cstdint>
#include <array>
#include <llmr/util/noncopyable.hpp>
namespace llmr {
class Shader : private util::noncopyable {
public:
Shader(const char *vertex, const char *fragment);
~Shader();
bool valid;
uint32_t program;
void setMatrix(const std::array<float, 16>& matrix);
private:
bool compileShader(uint32_t *shader, uint32_t type, const char *source);
protected:
std::array<float, 16> matrix = {{}};
int32_t u_matrix = -1;
};
}
#endif
|