~hp/canvas_display.lv2

dfaa366f95cba115bb1b40e629c3af3fd467a8fa — Hanspeter Portner 3 years ago 89ddeb2 + e7d6c8a
Merge commit 'e7d6c8af583033b4a09abe692f8736f0cb5e489a'
M canvas.lv2/canvas.lv2/canvas.h => canvas.lv2/canvas.lv2/canvas.h +1 -1
@@ 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

M canvas.lv2/canvas.lv2/forge.h => canvas.lv2/canvas.lv2/forge.h +1 -1
@@ 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

M canvas.lv2/canvas.lv2/idisp.h => canvas.lv2/canvas.lv2/idisp.h +1 -1
@@ 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

M canvas.lv2/canvas.lv2/render.h => canvas.lv2/canvas.lv2/render.h +4 -9
@@ 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

M canvas.lv2/canvas.lv2/render_cairo.h => canvas.lv2/canvas.lv2/render_cairo.h +2 -2
@@ 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>


M canvas.lv2/canvas.lv2/render_nanovg.h => canvas.lv2/canvas.lv2/render_nanovg.h +8 -2
@@ 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