From c428b79f98cab30aa22c06b37245e837f57870bc Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Sat, 8 Oct 2016 16:37:20 +0300 Subject: [PATCH] move platform specific codes to platform header --- include/cglm-opengl.h | 19 +------------------ include/cglm-platform.h | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 include/cglm-platform.h diff --git a/include/cglm-opengl.h b/include/cglm-opengl.h index ecb42db..7082277 100644 --- a/include/cglm-opengl.h +++ b/include/cglm-opengl.h @@ -8,26 +8,9 @@ #ifndef cglm_mat_opengl_h #define cglm_mat_opengl_h -#ifdef __APPLE__ -# include -#else -# ifdef _WIN32 -# include -# endif -# include -#endif - +#include "cglm-platform.h" #include "cglm.h" -#ifdef _WIN32 -extern -void -glUniformMatrix4fv(GLint location, - GLsizei count, - GLboolean transpose, - const GLfloat *value); -#endif - CGLM_INLINE void glm_mat4_uniform(mat4 m, GLint location){ diff --git a/include/cglm-platform.h b/include/cglm-platform.h new file mode 100644 index 0000000..2818856 --- /dev/null +++ b/include/cglm-platform.h @@ -0,0 +1,29 @@ +/* + * Copyright (c), Recep Aslantas. + * + * MIT License (MIT), http://opensource.org/licenses/MIT + * Full license can be found in the LICENSE file + */ + +#ifndef cglm_platform_h +#define cglm_platform_h + +#ifdef __APPLE__ +# include +#else +# ifdef _WIN32 +# include +# endif +# include +#endif + +#ifdef _WIN32 +extern +void +glUniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value); +#endif + +#endif /* cglm_platform_h */