From 5115814d5b53ed4c9da2803e6ab7c5898e9bef7c Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Mon, 19 Sep 2016 19:03:07 +0300 Subject: [PATCH] glm --> opengl helper function --- include/cglm-opengl.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/cglm-opengl.h diff --git a/include/cglm-opengl.h b/include/cglm-opengl.h new file mode 100644 index 0000000..66d317b --- /dev/null +++ b/include/cglm-opengl.h @@ -0,0 +1,19 @@ +/* + * Copyright (c), Recep Aslantas. + * + * MIT License (MIT), http://opensource.org/licenses/MIT + * Full license can be found in the LICENSE file + */ + +#ifndef cglm_mat_opengl_h +#define cglm_mat_opengl_h + +#include "cglm.h" + +CGLM_INLINE +void +glm_mat4_uniform(mat4 m, GLint location){ + glUniformMatrix4fv(location, 1, GL_FALSE, (GLfloat *)m); +} + +#endif /* cglm_mat_opengl_h */