Browse Source

Use nanovg in GL3 mode when DGL_USE_OPENGL3 is defined

pull/316/head
falkTX 3 years ago
parent
commit
11c532346a
2 changed files with 15 additions and 2 deletions
  1. +12
    -1
      dgl/src/NanoVG.cpp
  2. +3
    -1
      dgl/src/nanovg/nanovg_gl.h

+ 12
- 1
dgl/src/NanoVG.cpp View File

@@ -61,7 +61,18 @@ DGL_EXT(PFNGLBLENDFUNCSEPARATEPROC, glBlendFuncSeparate)
// Include NanoVG OpenGL implementation

//#define STB_IMAGE_STATIC
#define NANOVG_GL2_IMPLEMENTATION
#ifdef DGL_USE_OPENGL3
# define NANOVG_GL3_IMPLEMENTATION
#else
# define NANOVG_GL2_IMPLEMENTATION
#endif

#if defined(DISTRHO_OS_MAC) && defined(NANOVG_GL3_IMPLEMENTATION)
# define glBindVertexArray glBindVertexArrayAPPLE
# define glDeleteVertexArrays glDeleteVertexArraysAPPLE
# define glGenVertexArrays glGenVertexArraysAPPLE
#endif

#include "nanovg/nanovg_gl.h"

#if defined(NANOVG_GL2)


+ 3
- 1
dgl/src/nanovg/nanovg_gl.h View File

@@ -40,7 +40,9 @@ enum NVGcreateFlags {
#elif defined NANOVG_GL3_IMPLEMENTATION
# define NANOVG_GL3 1
# define NANOVG_GL_IMPLEMENTATION 1
# define NANOVG_GL_USE_UNIFORMBUFFER 1
# ifndef __APPLE__
# define NANOVG_GL_USE_UNIFORMBUFFER 1
# endif
#elif defined NANOVG_GLES2_IMPLEMENTATION
# define NANOVG_GLES2 1
# define NANOVG_GL_IMPLEMENTATION 1


Loading…
Cancel
Save