summaryrefslogtreecommitdiffstats
path: root/src/Shader.hpp
diff options
context:
space:
mode:
authorLaG1924 <lag1924@gmail.com>2021-06-13 10:47:33 +0200
committerLaG1924 <lag1924@gmail.com>2021-06-13 10:47:33 +0200
commitf2266b843959413277767a990bb9a9c5593f3489 (patch)
treef26e90e9f7ceb9be3c108eb5129305356ac8df3a /src/Shader.hpp
parentAdded RmlUi to CMakeLists.txt (diff)
downloadAltCraft-f2266b843959413277767a990bb9a9c5593f3489.tar
AltCraft-f2266b843959413277767a990bb9a9c5593f3489.tar.gz
AltCraft-f2266b843959413277767a990bb9a9c5593f3489.tar.bz2
AltCraft-f2266b843959413277767a990bb9a9c5593f3489.tar.lz
AltCraft-f2266b843959413277767a990bb9a9c5593f3489.tar.xz
AltCraft-f2266b843959413277767a990bb9a9c5593f3489.tar.zst
AltCraft-f2266b843959413277767a990bb9a9c5593f3489.zip
Diffstat (limited to '')
-rw-r--r--src/Shader.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Shader.hpp b/src/Shader.hpp
index 8e1ce9e..6b3220d 100644
--- a/src/Shader.hpp
+++ b/src/Shader.hpp
@@ -26,10 +26,18 @@ public:
void Activate();
+ inline void SetUniform(const std::string& name, unsigned int val, unsigned int val2) {
+ glUniform2ui(GetUniformLocation(name), val, val2);
+ }
+
inline void SetUniform(const std::string &name, int val) {
glUniform1i(GetUniformLocation(name), val);
}
+ inline void SetUniform(const std::string& name, int val, int val2) {
+ glUniform2i(GetUniformLocation(name), val, val2);
+ }
+
inline void SetUniform(const std::string &name, float val) {
glUniform1f(GetUniformLocation(name), val);
}