The following two submodules will be needed to build project:
$ git submodule add https://github.com/OpenGL-Graphics/opengl
$ git submodule add https://github.com/OpenGL-Graphics/glfw-window
+ src
| main.cpp
+ nanovg
| nanovg.c
+ include
+ nanovg
| nanovg.h
+ glfw-window
+ opengl
| CMakeLists.txt
$ mkdir build && cd build
$ cmake .. && make -j && ./main
Libraries candidates that could be used instead of Cairo to draw on image, as I couldn't find how to render directly to the OpenGL texture with Cairo.
ThorVG is built and installed with meson as suggested on Meson docs:
$ meson setup build-dir # configure project
$ cd build-dir
$ meson compile # build project
$ meson install # install project
ThorVG will be installed in the default prefix location (i.e. /usr/local/{include, lib}/).
- Doesn't seem to support the OpenGL renderer yet.
This one will be used as it's intrinsically a vector rendering library for OpenGL. NanoVG will be built as follows:
$ git clone --depth=1 https://github.com/memononen/nanovg/
$ apt install premake4
$ cd nanovg
$ premake4 gmake
$ cd build
$ make -j
$ ./example_gl3