Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

nyorain/vvg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vulkan Vector Graphics

Currently not maintained (and not compiling). Lacks many important features to implement the nanovg interface correctly and does not make efficient use of vulkan. Might only be useful to you as starting point if you want to implement a vulkan nanovg backend yourself (which is not a good idea imo now). I started rvg as a more efficient and working retained mode alternative.

vvg is a nanovg backend using the vulkan api licensed under the MIT License. It offers 2 interfaces:

The implementation itself is written in C++14 and uses the vpp library. It also makes use of the bintoheader tool to include the compiles spirv binaries directly into the source code. See for example src/shader/headers/fill.frag.h. Any bug reports, contributions and ideas are highly appreciated.

Usage

You have to choose if you want to use the C or the C++ api. You can either compile vvg to a static or shared library or compile its single source file and the nanovg source file with your program/library. Note that the implementation needs to be linked to the latest vpp if you choose to just built the implementation source togehter with you project.

Building can be done using meson.

Either install or copy the needed header (nanovg_vk.h for the C api or vvg.hpp for the C++ api) as well as the nanovg header which can also be found in the src/ directory (nanovg.h, needed to actually draw something, vvg is only the backend). For the C++ api make sure that the vpp headers are in your include path. For the C api make sure that you include vulkan.h BEFORE including the vvg header. You still have to link with vpp.

For an example how to use it see examples/example.cpp. It has only support for Windows at the moment (since it creates a window for rendering).

About

Vulkan NanoVG backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages