mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
move platform specific codes to platform header
This commit is contained in:
@@ -8,26 +8,9 @@
|
|||||||
#ifndef cglm_mat_opengl_h
|
#ifndef cglm_mat_opengl_h
|
||||||
#define cglm_mat_opengl_h
|
#define cglm_mat_opengl_h
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#include "cglm-platform.h"
|
||||||
# include <OpenGL/gl3.h>
|
|
||||||
#else
|
|
||||||
# ifdef _WIN32
|
|
||||||
# include <windows.h>
|
|
||||||
# endif
|
|
||||||
# include <GL/gl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "cglm.h"
|
#include "cglm.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
extern
|
|
||||||
void
|
|
||||||
glUniformMatrix4fv(GLint location,
|
|
||||||
GLsizei count,
|
|
||||||
GLboolean transpose,
|
|
||||||
const GLfloat *value);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CGLM_INLINE
|
CGLM_INLINE
|
||||||
void
|
void
|
||||||
glm_mat4_uniform(mat4 m, GLint location){
|
glm_mat4_uniform(mat4 m, GLint location){
|
||||||
|
|||||||
29
include/cglm-platform.h
Normal file
29
include/cglm-platform.h
Normal file
@@ -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 <OpenGL/gl3.h>
|
||||||
|
#else
|
||||||
|
# ifdef _WIN32
|
||||||
|
# include <windows.h>
|
||||||
|
# endif
|
||||||
|
# include <GL/gl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
extern
|
||||||
|
void
|
||||||
|
glUniformMatrix4fv(GLint location,
|
||||||
|
GLsizei count,
|
||||||
|
GLboolean transpose,
|
||||||
|
const GLfloat *value);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* cglm_platform_h */
|
||||||
Reference in New Issue
Block a user