Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a high performance vector graphics library I can use in my games.

I'm thinking along the lines of vector graphics such as those that can be made with SVG.

I'll consider any language at the moment (but must run on Windows). A solution that takes advantage of GPU hardware would be great.

Thanks in advance.

share|improve this question

closed as off-topic by Anko, MrCranky, Noctrine Apr 28 '14 at 23:39

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." – Anko, MrCranky, Noctrine
If this question can be reworded to fit the rules in the help center, please edit the question.

Is there any reason you want to use Vector Graphics? – AttackingHobo Oct 25 '10 at 2:24
Yes: I like the style, they can compress better than textures and they are more flexible for animation. – CiscoIPPhone Oct 25 '10 at 7:17

If Windows (Vista and beyond) is your only platform you should look into Direct2D, which provides GPU accelerated 2D vector graphics rendering with software fallback. For a more x-platform solution look into Cairo, which I believe to have a GPU accelerated rasterizer.

share|improve this answer
Interesting, I had never heard of Direct2D before. It doesn't seem to be widely used - perhaps because of it being Windows 7 only. – CiscoIPPhone Oct 24 '10 at 16:27
It is Vista and Windows 7 only, due to the use of Direct3D 10. And it is rather new :) – boki Oct 25 '10 at 2:11
Note that several high-profile game programmers consider Direct2D awful - (which also links to a podcast) and – user744 Oct 25 '10 at 18:01
I think the managed wrapper for Direct2D tends to be much easier to work with than the native library. And most of the criticisms I've read of Direct2D have cited examples where the same ends can be accomplished relatively easily in Direct3D. Sure, it's overkill to draw a rectangle, but it works well for curves and shapes with nontrivial texturing and/or stroking. Besides, D2D wasn't aimed primarily at game developers--it was intended to provide a richer, more performant alternative to GDI. But it does interoperate well with Direct3D. – Mike Strobel Oct 25 '10 at 18:57

OpenVG is a standard for hardware accelerated vector graphics. It is supported by GPUs targetted for handheld devices, such as Mali / PowerVR / Vivante. Qt and Cairo can use OpenVG as a rendering backed. There are software libraries that implement OpenVG using OpenGL hardware (MonkVG, AmanithVG GLE) or software only (AmanithVG SRE, ShivaVG, AlexVG).

share|improve this answer

Scaleform GFx is a commercial middleware library for integrating Adobe Flash movies (optimized rendering, ActionScript, and more) into your engine.

In a past life, Scaleform GFx's codebase was that of GameSWF. GameSWF is open source.

I planned to add more to this answer, but by the time I got back to it, most of main points I wanted to hit on were mentioned in other answers.

The only other thing I can think to mention that's relevant to the Flash-based approach is the fact that Adobe has released the source code to their ActionScript virtual machine, which now lives at the Tamarin Project at Mozilla.

share|improve this answer

If you are using windows XP or want something that works on most versions of windows, you should check out DirectDraw (even though it's a little old now) or GDI+, or you could use Flash, which seems pretty good for vector rendering, and is cross platform.

share|improve this answer
DirectDraw has been deprecated for some time now, and as far as I know, it has no native capabilities for rendering vector-based graphics. My recollection is that it relied entirely on textures and blitting. I believe GDI+ is unaccelerated and GDI, while accelerated, is rather primitive. It would be better to go with a library like Cairo, which supports multiple renderers, at least one of which supports GPU-accelerated rendering. Direct2D is probably the best choice for Vista and 7. – Mike Strobel Oct 25 '10 at 19:04
My bad, I thought GDI+ was accelerated! I guess Direct2D would be the best choice then as you say. – dotminic Oct 27 '10 at 16:20

There's some discussion here and there on how to work SVG graphics into the XNA game engine. One here: and here's a post on this very site:

XNA pipes pretty much everything through Direct3D as I understand it, so it's all GPU accelerated. You basically must program in C# to use it (you can kind of use other languages, but you have to hack at it.) Using XNA gets you Windows for sure, but also the possibility of porting to XBox360 and a couple of portable platforms.

share|improve this answer

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