8000 GitHub - UnGast/Cnanovg: Swift wrapper package for NanoVG
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

UnGast/Cnanovg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cnanovg - Swift wrapper package for NanoVG

NanoVG is a 2D drawing library written in C. It exposes an API very similar to the HTML canvas API. The API calls are buffered and then drawn via a backend like OpenGL (default). Ports to other backends exist as well.

To make it work with Swift a few blocks were moved around in the NanoVG source code.

How to use

First add .package(url: "https://github.com/UnGast/Cnanovg.git", .branch("master")) to your package as a dependency.

NanoVG can be used with different OpenGL versions. This wrapper package currently only exposes the implementation for OpenGL 3.2 core. To use it, add .product(name: "CnanovgGL3", package: "Cnanovg") as a dependency to the target you intend to use NanoVG in.

Then you can simply import CnanovgGL3 in your code.

You can find examples for how to use the api in the NanoVG repository.

Tested on Linux (Ubuntu) and MacOS with Swift 5.2

Dependencies

NanoVG on Github

NanoVG uses libraries from stb

About

Swift wrapper package for NanoVG

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0