开发者

OpenGL 2D editor?

I want to draw different 2D objects in OpenGL开发者_如何学JAVA 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 ?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜