I'm making a game and want to use vector graphics. I started re-coding it using Cairo and the performance is horrific. So, I'm looking for a different library. It needs to be for C++ and cross-platform (e.g. no Direct2D). There's another question someone asked before like this, but there weren't any suitable answers. There's got to be something...?

  • \$\begingroup\$ The "question asked before", do you mean gamedev.stackexchange.com/questions/4788/… ? \$\endgroup\$
    – Tetrad
    Oct 21, 2011 at 0:08
  • \$\begingroup\$ @Tetrad: The previous question implicitly excludes multi platform as it explicitly requests solutions for windows. And the answers seem to point only to Windows related solutions. \$\endgroup\$
    – Coyote
    Oct 21, 2011 at 1:29
  • 2
    \$\begingroup\$ @Zach Hinchy: When you say cross platform you mean what exactly? Windows, Linux, OS X? Or do you include handheld platforms iOS, Brew, Android? \$\endgroup\$
    – Coyote
    Oct 21, 2011 at 1:32
  • 2
    \$\begingroup\$ "There's got to be something...?" Why? Vector graphics, in general, is not something that people who need 30+fps do. Does your web browser load pages at 30fps? No. 10fps is plenty. If you use vector graphics, it's because you value quality over performance. And thus, vector graphics libraries value quality over performance. Cairo itself isn't slow, but it is a quality vector graphics renderer. And that quality means that it doesn't cut corners for performance. \$\endgroup\$ Nov 9, 2011 at 5:40
  • 1
    \$\begingroup\$ @iamcreasy: There is a big difference between simply drawing a quad bigger/smaller and a vector graphics library. Games render with the GPU; they do not use a vector graphics library. They do not use Cairo or AntiGrain or anything of those natures. \$\endgroup\$ Nov 9, 2011 at 18:50

3 Answers 3


I fear the subject is quite tricky, few multi platform solutions seem to have launched, and even fewer seem to have survived on their own. I was looking into the subject a few months ago. I had a constraint as I needed the engine to run on iOS and Android. Didn't find anything that suited me really at the time.

But a few pointers from what I remember: each GUI system has some form of drawing API. So you might find something of interest within the ones that are cross platform like QT.

An equivalent of cairo would be AntiGrain You might want to compare the performance.

OpenFrameworks has support for vector graphics.

A very big library which has some vector graphics support - and a language dedicated to it - is ImageMagick.

Lower level you'll find Libxmi and Libart from the gnome project.

Not a high level API - and I'm not sure what are the odds it will suit you - but there is the standard OpenVG. There are multiple ports of OpenVG over software OpenGL and OpenGL ES renderers. Mesa 3D also seems to have an OpenVG implementation. But for some platforms only commercial solutions will be available.

There are way higher level libraries which integrate APIs for vector graphics. Among these there is an open source one named Clutter for GUI design and used in serious game design there is scaleform (Not Open Source). This game engine has some functions to draw vector graphics: 2DEngine

EDIT: clutter uses cairo apparently.


MonkVG is a cross platform OpenVG emulation on top of OpenGL ES 1.1 and 2.0. See: https://github.com/micahpearlman/MonkVG

Note: I'm the original author and maintainer of this library. It has a very liberal BSD license.

  • \$\begingroup\$ This is a fine contribution to the question, but it's proper to note when you are promoting something with which you are affiliated (such as your own github account). \$\endgroup\$ May 20, 2014 at 23:07

I ended up not bothering and just going with high-res images and scaling with OpenGL. It works well enough for my situation.

  • 5
    \$\begingroup\$ You asked about a library but accepted an answer where it says, just pick the other way around(ignoring the fact that its yours answer). Its not a good judgement. (also ignoring the fact that it maybe took @Coyoto around 15 min to write his answer). Have a nice day! \$\endgroup\$ Nov 9, 2011 at 9:30
  • 1
    \$\begingroup\$ this is about 3 years too late, but another answer was submitted recently and I got the notification, so I've finally seen this. I went ahead and un-accepted mine and accepted @Coyote's. I'm sorry about that, I didn't really quite understand StackOverflow back then. better late than never, I hope - hopefully it'll help people that see the question in the future. \$\endgroup\$ Jun 14, 2014 at 3:17

Not the answer you're looking for? Browse other questions tagged .