commit 655448ff6957cbe63e4c5b3a5f2b42b3a86e1166 parent c83c3a49c983adc0b9b23dc35b4aa3852e0a642d Author: Michael Savage <mikejsavage@gmail.com> Date: Mon Aug 17 21:53:41 +0200 Use GLFW_INCLUDE_NONE and include platform_opengl when we want gl.h Diffstat:
Makefile | | | 3 | +-- |
bsp.cc | | | 1 | + |
gl.cc | | | 2 | ++ |
hm.cc | | | 1 | + |
main.cc | | | 1 | + |
diff --git a/Makefile b/Makefile @@ -6,7 +6,7 @@ HMOBJS = hm.o heightmap.o terrain_manager.o work_queue.o stb_image.o stb_perlin. PPOBJS = pp.o stb_image.o stb_image_write.o WARNINGS = -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-write-strings -CXXFLAGS += -std=c++11 -O2 $(WARNINGS) -ggdb3 -DGL_GLEXT_PROTOTYPES -pthread +CXXFLAGS += -std=c++11 -O2 -pthread -ggdb3 $(WARNINGS) -DGL_GLEXT_PROTOTYPES -DGLFW_INCLUDE_NONE # OS detection ifneq ($(shell uname -s),Darwin) @@ -14,7 +14,6 @@ ifneq ($(shell uname -s),Darwin) LDFLAGS += -lGLU else # 8) - CXXFLAGS += -DGLFW_INCLUDE_GLCOREARB CXXFLAGS += -I/usr/local/Cellar/glfw3/3.1.1/include CXXFLAGS += -I/usr/local/Cellar/glm/0.9.6.3/include LDFLAGS += -lm -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework CoreVideo diff --git a/bsp.cc b/bsp.cc @@ -2,6 +2,7 @@ #include <fstream> #include <math.h> +#include "platform_opengl.h" #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> diff --git a/gl.cc b/gl.cc @@ -1,5 +1,7 @@ #include <stdlib.h> #include <err.h> + +#include "platform_opengl.h" #include <GLFW/glfw3.h> #ifndef __APPLE__ diff --git a/hm.cc b/hm.cc @@ -3,6 +3,7 @@ #include <math.h> #include <err.h> +#include "platform_opengl.h" #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> diff --git a/main.cc b/main.cc @@ -4,6 +4,7 @@ #include <sys/stat.h> #include <sys/types.h> +#include "platform_opengl.h" #include <GLFW/glfw3.h> #include "game.h"