-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShader.hpp
43 lines (38 loc) · 867 Bytes
/
Shader.hpp
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
#pragma once
#include "Resource.hpp"
struct Shader
{
protected:
unsigned int ProgramID;
public:
Shader() = default;
~Shader();
Shader(Shader&& _right);
Shader(const Shader&) = delete;
/**
* @brief Set it to the current shader
*
*/
void use() const;
/**
* @brief Set uniform bool value
*
* @param name uniform name
* @param value bool value
*/
void setBool(const std::string_view name, bool value) const;
/**
* @brief Set uniform int value
*
* @param name uniform name
* @param value int value
*/
void setInt(const std::string_view name, int value) const;
/**
* @brief Set uniform float value
*
* @param name uniform name
* @param value float value
*/
void setFloat(const std::string_view name, float value) const;
};