Browse Source

NANOVG_GLES2_IMPLEMENTATION implies NANOVG_GLES2

shared-context
Andrew Corrigan 11 years ago
parent
commit
1fe6cb36dc
4 changed files with 20 additions and 4 deletions
  1. +1
    -2
      example/example_gles2.c
  2. +1
    -2
      example/example_gles3.c
  3. +9
    -0
      src/nanovg_gl2.h
  4. +9
    -0
      src/nanovg_gl3.h

+ 1
- 2
example/example_gles2.c View File

@@ -20,8 +20,7 @@
#define GLFW_INCLUDE_ES2
#include <GLFW/glfw3.h>
#include "nanovg.h"
#define NANOVG_GL2_IMPLEMENTATION
#define NANOVG_GLES2
#define NANOVG_GLES2_IMPLEMENTATION
#include "nanovg_gl2.h"
#include "demo.h"



+ 1
- 2
example/example_gles3.c View File

@@ -20,8 +20,7 @@
#define GLFW_INCLUDE_ES3
#include <GLFW/glfw3.h>
#include "nanovg.h"
#define NANOVG_GL3_IMPLEMENTATION
#define NANOVG_GLES3
#define NANOVG_GLES3_IMPLEMENTATION
#include "nanovg_gl3.h"
#include "demo.h"



+ 9
- 0
src/nanovg_gl2.h View File

@@ -24,6 +24,15 @@ extern "C" {

#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

struct NVGcontext* nvgCreateGLES2(int atlasw, int atlash, int edgeaa);


+ 9
- 0
src/nanovg_gl3.h View File

@@ -24,6 +24,15 @@ extern "C" {

#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

struct NVGcontext* nvgCreateGLES3(int atlasw, int atlash, int edgeaa);


Loading…
Cancel
Save