From 4ac2b44ea719cb1142954bc6ca8a6608556cc813 Mon Sep 17 00:00:00 2001 From: Olli Wang Date: Mon, 6 Mar 2017 22:08:08 +0800 Subject: [PATCH] Fixes how glext header is included. This commit fixes the issue caused by #357 that nanovg failed to compile on iOS due to the wrong way of including glext header. --- example/example_gl2.c | 1 + example/example_gl3.c | 1 + example/example_gles2.c | 1 + example/example_gles3.c | 1 + src/nanovg_gl.h | 4 ---- 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/example_gl2.c b/example/example_gl2.c index 850d736..7fd5621 100644 --- a/example/example_gl2.c +++ b/example/example_gl2.c @@ -20,6 +20,7 @@ #ifdef NANOVG_GLEW # include #endif +#define GLFW_INCLUDE_GLEXT #include #include "nanovg.h" #define NANOVG_GL2_IMPLEMENTATION diff --git a/example/example_gl3.c b/example/example_gl3.c index ccb2f83..409a145 100644 --- a/example/example_gl3.c +++ b/example/example_gl3.c @@ -23,6 +23,7 @@ #ifdef __APPLE__ # define GLFW_INCLUDE_GLCOREARB #endif +#define GLFW_INCLUDE_GLEXT #include #include "nanovg.h" #define NANOVG_GL3_IMPLEMENTATION diff --git a/example/example_gles2.c b/example/example_gles2.c index 8879fd0..ed78838 100644 --- a/example/example_gles2.c +++ b/example/example_gles2.c @@ -18,6 +18,7 @@ #include #define GLFW_INCLUDE_ES2 +#define GLFW_INCLUDE_GLEXT #include #include "nanovg.h" #define NANOVG_GLES2_IMPLEMENTATION diff --git a/example/example_gles3.c b/example/example_gles3.c index 4c88df9..4a6084c 100644 --- a/example/example_gles3.c +++ b/example/example_gles3.c @@ -18,6 +18,7 @@ #include #define GLFW_INCLUDE_ES3 +#define GLFW_INCLUDE_GLEXT #include #include "nanovg.h" #define NANOVG_GLES3_IMPLEMENTATION diff --git a/src/nanovg_gl.h b/src/nanovg_gl.h index 3f34ddf..25f9d80 100644 --- a/src/nanovg_gl.h +++ b/src/nanovg_gl.h @@ -113,10 +113,6 @@ enum NVGimageFlagsGL { #include #include "nanovg.h" -#ifdef __APPLE__ -# include -#endif - enum GLNVGuniformLoc { GLNVG_LOC_VIEWSIZE, GLNVG_LOC_TEX,