aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2021-07-14 21:53:44 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2021-07-14 21:53:44 +0200
commit20b025728fc2f5f7312ae1774177dc116cfd8b3d (patch)
treec42b86458d07e9cfa0122daed9de7ff9213a1dcc
parenta7a42c21c5372a0d7d70285dc0ff15960a20f61c (diff)
downloadsynthpod-20b025728fc2f5f7312ae1774177dc116cfd8b3d.tar.xz
Squashed 'canvas.lv2/' changes from 7b775b4b0..b700b88f8
b700b88f8 Use GLES3, deprecate direct inclusion of render.h. git-subtree-dir: canvas.lv2 git-subtree-split: b700b88f86069d4ee1cdf1b3780a0e4796269134
-rw-r--r--canvas.lv2/canvas.h2
-rw-r--r--canvas.lv2/forge.h2
-rw-r--r--canvas.lv2/idisp.h2
-rw-r--r--canvas.lv2/render.h13
-rw-r--r--canvas.lv2/render_cairo.h4
-rw-r--r--canvas.lv2/render_nanovg.h10
6 files changed, 17 insertions, 16 deletions
diff --git a/canvas.lv2/canvas.h b/canvas.lv2/canvas.h
index 7cca0fae..22e39b26 100644
--- a/canvas.lv2/canvas.h
+++ b/canvas.lv2/canvas.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2016-2021 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the Artistic License 2.0 as published by
diff --git a/canvas.lv2/forge.h b/canvas.lv2/forge.h
index c5ce5fe0..ae9ab681 100644
--- a/canvas.lv2/forge.h
+++ b/canvas.lv2/forge.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2016-2021 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the Artistic License 2.0 as published by
diff --git a/canvas.lv2/idisp.h b/canvas.lv2/idisp.h
index 099ab2c6..d61b4798 100644
--- a/canvas.lv2/idisp.h
+++ b/canvas.lv2/idisp.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2016-2021 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the Artistic License 2.0 as published by
diff --git a/canvas.lv2/render.h b/canvas.lv2/render.h
index b8098041..6d9580c8 100644
--- a/canvas.lv2/render.h
+++ b/canvas.lv2/render.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2016-2021 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the Artistic License 2.0 as published by
@@ -18,12 +18,13 @@
#ifndef _LV2_CANVAS_RENDER_H
#define _LV2_CANVAS_RENDER_H
+// Do NOT use this header directly, use render_{nanovg,cairo}.h instead
+#include <canvas.lv2/canvas.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#include <canvas.lv2/canvas.h>
-
#define LV2_CANVAS_NUM_METHODS 26
typedef struct _LV2_Canvas_Meth LV2_Canvas_Meth;
@@ -78,10 +79,4 @@ _lv2_canvas_render_get_type(const LV2_Atom *body, LV2_URID type)
}
#endif
-#if defined(LV2_CANVAS_RENDER_NANOVG)
-# include <canvas.lv2/render_nanovg.h>
-#else
-# include <canvas.lv2/render_cairo.h>
-#endif
-
#endif // _LV2_CANVAS_RENDER_H
diff --git a/canvas.lv2/render_cairo.h b/canvas.lv2/render_cairo.h
index a41c72cb..c2516992 100644
--- a/canvas.lv2/render_cairo.h
+++ b/canvas.lv2/render_cairo.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2016-2021 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the Artistic License 2.0 as published by
@@ -20,7 +20,7 @@
#include <assert.h>
-#include <canvas.lv2/canvas.h>
+#include <canvas.lv2/render.h>
#include <cairo/cairo.h>
diff --git a/canvas.lv2/render_nanovg.h b/canvas.lv2/render_nanovg.h
index a98bc958..72801539 100644
--- a/canvas.lv2/render_nanovg.h
+++ b/canvas.lv2/render_nanovg.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2016-2021 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the Artistic License 2.0 as published by
@@ -20,6 +20,8 @@
#include <assert.h>
+#include <canvas.lv2/render.h>
+
#include <nanovg.h>
#if defined(__APPLE__)
@@ -29,8 +31,12 @@
# include <GL/glew.h>
#endif
-#define NANOVG_GL2_IMPLEMENTATION
+#define NANOVG_GLES3_IMPLEMENTATION
#include <nanovg_gl.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wsign-compare"
+#include <nanovg_gl_utils.h>
+#pragma GCC diagnostic pop
#if defined(NANOVG_GL2_IMPLEMENTATION)
# define nvgCreate nvgCreateGL2