Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
MonkVG is an OpenVG 1.1 like vector graphics API implementation optimized for game use currently using an OpenGL ES backend that should be compatible with any HW that supports OpenGL ES 2.0 which includes most iOS and Android devices.
branch: master

This branch is even with talentless:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

MonkVG -- An OpenVG implementation


MonkVG is an OpenVG 1.1 like vector graphics API implementation currently using an OpenGL ES backend that should be compatible with any HW that supports OpenGL ES 1.1 which includes most iOS and Android devices as well as OSX and Windows platforms.

This is an open source BSD licensed project that is in active development. Contributors and sponsors welcome.

It can be found at GitHub

Projects using MonkVG include:


Not even versioned yet for download. Use git to clone:

$ git clone

There are currently iOS and OSX XCode 4 projects as well as contributed Android projects (thanks Paul Holden)and Windows project (thanks Vincent Richomme).

TODO: standard *nix Makefiles.


MonkVG was originally created for games, so speed has usually been prefered over quality or full OpenVG compliance. To improve speed there have been MonkVG specific extensions. See "vgext.h" for some of the details.

What is implemented

  • Most all path segment commands including: moves, lines, bezier curves, elliptical arcs.
  • Robust contour tesselation supporting both fill rules.
  • Very basic stroking.
  • Most paints including: Solid color fill, linear and radial gradients.
  • Bitmap font rendering.
  • Bitmap image rendering.
  • OpenVG utility library (see vgu.h)


  • Pattern fills and strokes.
  • Gradient fills on strokes (works for fills).
  • Stroke font rendering (may work just untested).
  • Various blending modes (somewhat working already).
  • Scissoring and masking.
  • Improve stroking geometry generation.

Probably never support

  • Image filters.
  • Anti-aliasing. (Though this can be supported outside OpenVG. For example iOS fullscreen AA glRenderbufferStorageMultisampleAPPLE method)


Paul Holden (Android Port)
Vincent Richomme (Windows Port)

Also Luke contributed a great article on how to integrate MonkVG + MonkSWF with Cocos2D:

Simple Example

NOTE: MonkVG will not create a OpenGL context, it is the applications responsibility to create there own OpenGL context. Also, if your application does any other OpenGL rendering it should save off the GL state and then restore before calling any MonkVG methods.

VGPaint _paint;
VGPath _path;
void init() {
    ... setup platform specific opengl ...
    // setup the OpenVG context
    vgCreateContextSH( 320, 480 );

    // create a paint
    _paint = vgCreatePaint();
    vgSetPaint(_paint, VG_FILL_PATH );
    VGfloat color[4] = { 1.0f, 0.0f, 0.0f, 1.0f };
    vgSetParameterfv(_paint, VG_PAINT_COLOR, 4, &color[0]);

    // create a box path
    vguRect( _path, 50.0f, 50.0f, 90.0f, 50.0f );


void draw() {
    ... start opengl context ...
    /// draw the basic path
    vgTranslate( screenWidth/2, screenHeight/2 );
    vgSetPaint( _paint, VG_FILL_PATH );
    vgDrawPath( _path, VG_FILL_PATH );

    ... end opengl context ...

Something went wrong with that request. Please try again.