Git Product home page Git Product logo

nanovg-rs's Introduction

NanoVG - Rust Wrapper

NanoVG-RS is a wrapper around the NanoVG vector graphics library for the Rust programming language.

NanoVG is small antialiased vector graphics rendering library for OpenGL. It has lean API modeled after HTML5 canvas API. It is aimed to be a practical and fun toolset for building scalable user interfaces and visualizations.

NanoVG-RS provides a fully featured, functional, high-level and Rust-idiomatic API on top of the NanoVG C-API.

Building

We recommend grabbing the latest release from crates.io.

Alternatively, you can clone and build the library yourself:

git clone --recursive https://github.com/KevinKelley/nanovg-rs
cd nanovg-rs
cargo build

This library comes with a very useful example called demo-glutin. If you want to make sure that nanovg is working on your system, clone and build this crate as shown above and run the command cargo run --example demo-glutin --features="gl3". This should produce a window similar to that below.

Note that when running the examples, the needed resources might not be found if you run it without a cargo run --example command. Thist is just a working-directory path issue.

Usage

Add the following to your Cargo.toml:

[dependencies.nanovg]
version = "Use the latest version from crates.io"
features = ["glX"]

glX can be exactly one of gl2, gl3, gles2 or gles3, to specify the version of OpenGL to use. Use gl3 or gl2 for computers and gles3 or gles2 for mobile devices.

TODO: SIMPLE API GUIDE

Screenshots

demo-glutin Output of the demo-glutin example.

Interesting Links

License

The binding is licensed under the MIT license. NanoVG is released under the zlib license.

nanovg-rs's People

Contributors

dleslie avatar enex avatar genbattle avatar gw3583 avatar henrikno avatar kevinkelley avatar lisoph avatar lordi avatar mthiesen avatar netvl avatar oipo avatar readmecritic avatar sergejjurecko avatar tamamu avatar wezm avatar whitequark avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.