Browse Source

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.
shared-context
Olli Wang 8 years ago
parent
commit
4ac2b44ea7
5 changed files with 4 additions and 4 deletions
  1. +1
    -0
      example/example_gl2.c
  2. +1
    -0
      example/example_gl3.c
  3. +1
    -0
      example/example_gles2.c
  4. +1
    -0
      example/example_gles3.c
  5. +0
    -4
      src/nanovg_gl.h

+ 1
- 0
example/example_gl2.c View File

@@ -20,6 +20,7 @@
#ifdef NANOVG_GLEW
# include <GL/glew.h>
#endif
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#include "nanovg.h"
#define NANOVG_GL2_IMPLEMENTATION


+ 1
- 0
example/example_gl3.c View File

@@ -23,6 +23,7 @@
#ifdef __APPLE__
# define GLFW_INCLUDE_GLCOREARB
#endif
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#include "nanovg.h"
#define NANOVG_GL3_IMPLEMENTATION


+ 1
- 0
example/example_gles2.c View File

@@ -18,6 +18,7 @@

#include <stdio.h>
#define GLFW_INCLUDE_ES2
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#include "nanovg.h"
#define NANOVG_GLES2_IMPLEMENTATION


+ 1
- 0
example/example_gles3.c View File

@@ -18,6 +18,7 @@

#include <stdio.h>
#define GLFW_INCLUDE_ES3
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#include "nanovg.h"
#define NANOVG_GLES3_IMPLEMENTATION


+ 0
- 4
src/nanovg_gl.h View File

@@ -113,10 +113,6 @@ enum NVGimageFlagsGL {
#include <math.h>
#include "nanovg.h"

#ifdef __APPLE__
# include <OpenGL/glext.h>
#endif

enum GLNVGuniformLoc {
GLNVG_LOC_VIEWSIZE,
GLNVG_LOC_TEX,


Loading…
Cancel
Save