diff options
author | LaG1924 <lag1924@gmail.com> | 2021-06-13 10:47:33 +0200 |
---|---|---|
committer | LaG1924 <lag1924@gmail.com> | 2021-06-13 10:47:33 +0200 |
commit | f2266b843959413277767a990bb9a9c5593f3489 (patch) | |
tree | f26e90e9f7ceb9be3c108eb5129305356ac8df3a /src/Shader.hpp | |
parent | Added RmlUi to CMakeLists.txt (diff) | |
download | AltCraft-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 'src/Shader.hpp')
-rw-r--r-- | src/Shader.hpp | 8 |
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); } |