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...?
|
|
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. |
||||
|
|
|
I ended up not bothering and just going with high-res images and scaling with OpenGL. It works well enough for my situation. |
|||||
|