views:

111

answers:

2

I want to draw different 2D objects in OpenGL for example a path/Road ,is there any program i could draw them using a GUI then transfer them to points so i could use them in my program ?

A: 

Somewhat heavy handed, but you could use Inkscape to create SVG files, and then just parse out the path vertexes.

genpfault
A: 

I have personally used Inkscape to do this. If you save your data as SVG, then any standard XML parsing library should make it relatively easy to extract your data. Even better, you might even find an SVG parsing library that will make it even easier. I created one in Python, based on the work of Martin O'Leary of supereffective:

http://pypi.python.org/pypi/svgbatch

It's very fragile and incomplete (it barfs on svg elements it doesn't recognise) but if you stick to the SVG elements it recognises (closed polygon paths, no curves) then it works, and it might help you put together one of your own.

Tartley