Support Apple include files for OpenGL

This commit is contained in:
Epicalert 2021-01-07 13:12:36 +08:00
parent e8df1282d2
commit e657b3d48e
No known key found for this signature in database
GPG key ID: CAA46F858D0979BD
3 changed files with 17 additions and 1 deletions

View file

@ -1,5 +1,11 @@
#ifdef __APPLE__
#include <OpenGL/glew.h>
#include <OpenGL/freeglut.h>
#else
#include <GL/glew.h>
#include <GL/freeglut.h> //includes glu.h and gl.h
#include <GL/freeglut.h>
#endif
#include <glm/mat4x4.hpp>
#include <glm/ext/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

View file

@ -1,7 +1,12 @@
#ifndef GRAPHICS_H
#define GRAPHICS_H
#ifdef __APPLE__
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
#include <glm/vec2.hpp>
void initGraphics ();

View file

@ -1,4 +1,9 @@
#ifdef __APPLE__
#include <OpenGL/glew.h>
#else
#include <GL/glew.h>
#endif
#include <glm/mat4x4.hpp>
#include <glm/gtc/type_ptr.hpp>