Sign up ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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...?

share|improve this question

closed as off-topic by MFAH, Trevor Powell, Seth Battin, Josh Petrie May 21 '14 at 3:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – MFAH, Trevor Powell, Seth Battin, Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

The "question asked before", do you mean… ? –  Tetrad Oct 21 '11 at 0:08
@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. –  Coyote Oct 21 '11 at 1:29
@Zach Hinchy: When you say cross platform you mean what exactly? Windows, Linux, OS X? Or do you include handheld platforms iOS, Brew, Android? –  Coyote Oct 21 '11 at 1:32
"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. –  Nicol Bolas Nov 9 '11 at 5:40
@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. –  Nicol Bolas Nov 9 '11 at 18:50

3 Answers 3

up vote 18 down vote accepted

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.

share|improve this answer

MonkVG is a cross platform OpenVG emulation on top of OpenGL ES 1.1 and 2.0. See:

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

share|improve this answer
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). –  Seth Battin May 20 '14 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.

share|improve this answer
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! –  iamcreasy Nov 9 '11 at 9:30
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. –  Zach Hinchy Jun 14 '14 at 3:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.