Is there a good cross-platform C++ vector graphics library out there?

Zach Hinchy
  • Is there a good cross-platform C++ vector graphics library out there? Zach Hinchy

    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.

c++ graphics vector
Related questions and answers
  • I'm looking into building a cross-platform opensource 2D RPG style game engine for ChaiScript. I want to be able to do all of the graphics with SVG and need joystick input. I also need the libraries I use to be opensource and compatible with the BSD license. I'm familiar with allegro, ClanLib, and SDL. As far as I can tell, none of these libraries have built in or obvious integration for SVG... support in a 2D C++ library while minimizing dependencies as much as possible (preferably avoiding Qt altogether)?

  • Are you aware of a complete (or almost complete) cross platform math library for use in OpenGL ES 2.0 games? The library should contain: Matrix2x2, Matrix 3x3, Matrix4x4 classes Quaternions Vector2, Vector3, Vector4 Classes Euler Angle Class Operations amongh the above mentioned classes, conversions, etc.. Standardly used math operations in 3D graphics (Dot Product, Cross Product, SLERP, etc...) Is there such Math API available either standalone or as a part of any package? Programming Language: Visual C++ but planned to be ported to OS X and Android OS.

  • I've been using SDL 1.2.14 for awhile without using many of the features from newer OpenGL versions. I'm now interested working only with the 3.3 API (not using the deprecated functions, etc... that's the latest my graphics card supports), but I'm having trouble getting set up. Here's some information about my development environment: Windows 7 64 bit Eclipse Helios CDT Mingw Toolchain C++ I've tried building SDL 1.3 and following this tutorial. This ended up being a pretty big pain and I gave up amid a stream of compile errors - I'd prefer to not go this route if possible. I know also

  • The answers to this cross-platform related question are useful, however I want my (C++) game to run on Windows and Linux (and be packaged for Ubuntu) only. I'm not interested in platforms like mobile or consoles. Are there any specific tips or suggestions for this case? Also, if I get the game to work on linux, is it difficult to add support for OSX? Updating with more information: It will be a 3D game simulating the motion of spacecraft in the solar system. We will use Ogre3D for the graphics. We're still in the design phase, so there's no code written yet.

  • I'm writing a platform game which uses SDL for the main graphics code. There is a chance that I may be using OpenGL for the rendering at a later stage, so answers could relate to either. I'm needing a good method to include vector animations (such as a starting video) within the game. Being a platform game, I would prefer to limit the dependents and size of the data. This rules out using Theora as the resulting vector animations would be needlessly lossy and overly large compared to the rest of the content. Flash sounds like an OK option, however it is finicky to embed (or even use) on non

  • ( 10.0f, 0.0f, 0.0f, 1.0f ); // z rotation Are my maths and approach correct, or am I completely wrong? Finally, I'm using the glm library with OpenGL / C++ for this. Is the order of x rotation...I'm attempting to create a 3d tree procedurally. I'm hoping that someone can check my vector rotation maths, as I'm a bit confused. I'm using an l-system (a recursive algorithm for generating branches). The trunk of the tree is the root node. It's orientation is aligned to the y axis. In the next iteration of the tree (e.g. the first branches), I might create a branch that is oriented say

  • Choosing an Audio API Aidan Knight

    Possible Duplicate: Cross-Platform Audio API Suggestions I have gone down this road a few times, and always decided to put it off. I am finally to the point I need to choose an Audio library and stick with it. I switched physics engines 3 times which caused quite a bit of wasted time, so I would like to be set when I pick an Audio lib. I will be falling into the "indie" section as far... looking for something more drag and drop rather than something I am going to be basically writing my own front-end for. I am curious though, I remember stumbling across another library or two a few

  • I'm trying to make a simple 2D animation file format. It'll be very rudimentary: only an XML file containing some parameters (such as frame duration) and metadata, and some images, each representing a frame. I'd like to have the whole animation (frames and XML document) packed in a single file. How do you suggest I do that? What libraries are there that would allow easy access to the files inside the animation file itself? The language I'm using is C++ and the platform is Windows, but I'd rather not use a platform dependent library, if possible.

  • I'm looking for a SIMD library focused small (4x4) matrix operations for graphics. There's lots of single precision ones out there, but I need to support both single and double precision. I've looked at Intel's IPP MX library, but I'd prefer something with source. I'm very interested in SSE3+ implementations of these particular operations: Mat4 * Mat4 Mat4 * Vec4 Mat4 * Array of Mat4 Mat4 * Array of Vec4 Mat4 inversion (nice to have)

Data information