Description

A dynamic binding to the nanovg library.

Package Information

Version1.0.0 (2016-Nov-26)
Repository https://github.com/misu-rg/DerelictNANOVG
Licensepublic domain
AuthorsMikko Mononen, Robert Georges
Registered byMisu
Dependencies

derelict-util

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

/ Work in progress /

nanovg

NanoVG is small antialiased vector graphics rendering library for OpenGL

Author : Mikko Mononen https://github.com/memononen/nanovg

DerelictNANOVG

Dynamic bindings to the nanovg library for the D programming language.

How to use

You need a valid GL3 context to use nanovg (I will add nvgCreateGL2 and GLes later !);

You just need to create a NVGContext :

DerelictGL3.reload();
DerelictNANOVG.load();

auto nvg = nvgCreateGL3(NVGcreateFlags.NVG_STENCIL_STROKES | NVGcreateFlags.NVG_DEBUG);

// You can now draw something
while(gameAlive)
{
    ///...

    nvgBeginFrame(nvg, ...);
    {
        drawWindow(nvg, ...);
    }
    nvgEndFrame(nvg);

    ///..
}

Available versions

1.0.0