@@ -20,8 +20,7 @@ | |||||
#define GLFW_INCLUDE_ES2 | #define GLFW_INCLUDE_ES2 | ||||
#include <GLFW/glfw3.h> | #include <GLFW/glfw3.h> | ||||
#include "nanovg.h" | #include "nanovg.h" | ||||
#define NANOVG_GL2_IMPLEMENTATION | |||||
#define NANOVG_GLES2 | |||||
#define NANOVG_GLES2_IMPLEMENTATION | |||||
#include "nanovg_gl2.h" | #include "nanovg_gl2.h" | ||||
#include "demo.h" | #include "demo.h" | ||||
@@ -20,8 +20,7 @@ | |||||
#define GLFW_INCLUDE_ES3 | #define GLFW_INCLUDE_ES3 | ||||
#include <GLFW/glfw3.h> | #include <GLFW/glfw3.h> | ||||
#include "nanovg.h" | #include "nanovg.h" | ||||
#define NANOVG_GL3_IMPLEMENTATION | |||||
#define NANOVG_GLES3 | |||||
#define NANOVG_GLES3_IMPLEMENTATION | |||||
#include "nanovg_gl3.h" | #include "nanovg_gl3.h" | ||||
#include "demo.h" | #include "demo.h" | ||||
@@ -24,6 +24,15 @@ extern "C" { | |||||
#define NVG_ANTIALIAS 1 | #define NVG_ANTIALIAS 1 | ||||
#ifdef NANOVG_GLES2_IMPLEMENTATION | |||||
# ifndef NANOVG_GLES2 | |||||
# define NANOVG_GLES2 | |||||
# endif | |||||
# ifndef NANOVG_GL2_IMPLEMENTATION | |||||
# define NANOVG_GL2_IMPLEMENTATION | |||||
# endif | |||||
#endif | |||||
#ifdef NANOVG_GLES2 | #ifdef NANOVG_GLES2 | ||||
struct NVGcontext* nvgCreateGLES2(int atlasw, int atlash, int edgeaa); | struct NVGcontext* nvgCreateGLES2(int atlasw, int atlash, int edgeaa); | ||||
@@ -24,6 +24,15 @@ extern "C" { | |||||
#define NVG_ANTIALIAS 1 | #define NVG_ANTIALIAS 1 | ||||
#ifdef NANOVG_GLES3_IMPLEMENTATION | |||||
# ifndef NANOVG_GLES3 | |||||
# define NANOVG_GLES3 | |||||
# endif | |||||
# ifndef NANOVG_GL3_IMPLEMENTATION | |||||
# define NANOVG_GL3_IMPLEMENTATION | |||||
# endif | |||||
#endif | |||||
#ifdef NANOVG_GLES3 | #ifdef NANOVG_GLES3 | ||||
struct NVGcontext* nvgCreateGLES3(int atlasw, int atlash, int edgeaa); | struct NVGcontext* nvgCreateGLES3(int atlasw, int atlash, int edgeaa); | ||||