Alex Rivera | Logout

Displaying SVG in OpenGL without intermediate raster

Asked 2009-06-22T13:20:41.090
30

I have some simple SVG artwork (icon and glyph kind of things) which I want to display in an OpenGL app (developing in C++ on Debian, using Qt).

The obvious solution is to use the ImageMagick libs to convert the SVGs to raster images and texture map them onto some suitable polygons (or just use good old glDrawPixels()).

However, I'm wondering if there's anything out there which will translate the SVG directly to a sequence of OpenGL calls and render it using OpenGL's lines, polygons and the like. Anyone know of anything which can do this?

Edit
Report

1 Answer

2

It looks like Inkscape has some interesting export options you may find useful. They include DXF, PovRay, EPS, PS (PostScript), XAML, Latex and OpenDocument Drawing (ODG). Perhaps there is a converter for one of those and you could use Inkscape as an intermediary.

DXF in particular is a likely candidate since it is a common 3D format already. assimp is a good candidate for loading DXF.

answered 2009-06-22T13:29:28.170

Your Answer