diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-14 11:38:09 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-14 11:38:09 +0000 |
commit | 08128c14ec49a2b357e830c832ccd0a8e63c175d (patch) | |
tree | 6634dea4e5d8bac32bdcf1c2ea68000874c61a5a /gfx/gl/uiShader.h | |
parent | We only need 3x3 matrix for model rotation spec (diff) | |
download | ilt-08128c14ec49a2b357e830c832ccd0a8e63c175d.tar.bz2 ilt-08128c14ec49a2b357e830c832ccd0a8e63c175d.tar.xz ilt-08128c14ec49a2b357e830c832ccd0a8e63c175d.zip |
Add traits wrapper for setting uniforms
Diffstat (limited to 'gfx/gl/uiShader.h')
-rw-r--r-- | gfx/gl/uiShader.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gfx/gl/uiShader.h b/gfx/gl/uiShader.h index 362e90c..99c5e17 100644 --- a/gfx/gl/uiShader.h +++ b/gfx/gl/uiShader.h @@ -1,6 +1,7 @@ #pragma once #include "config/types.h" +#include "gl_traits.h" #include "program.h" #include <cstddef> #include <glad/gl.h> @@ -21,7 +22,7 @@ private: { const RequiredUniformLocation uiProjectionLoc {*this, "uiProjection"}; glUseProgram(*this); - glUniformMatrix4fv(uiProjectionLoc, 1, GL_FALSE, glm::value_ptr(vp)); + glUniform(uiProjectionLoc, vp); } }; |