AWT has an option called GeneralPath how i can use a like with JOGL..

Hello!

Im a fan of AWT CurveTo and LineTo commands, i use GeneralPath when i draw my .SVG paths to AWT Canvas…

now, i have growing intrestines for using generalpath or similiar with JOGL…

what are the best ways to draw filled and stroked .svg files to glcanvas ??

i only have limited knowledge of Java and JOGL, but i have allready managed to success with AWT and GeneralPath,
now i need help with JOGL and GeneralPath,
my current way is to draw .SVG file to BufferedImage and create a texture from BIMG for drawing to GLCanvas…
still, im sure that there is a better way to do .SVG files to GLCanvas…

what i need to learn ??

any simple tutorials ??

//----

thanks…

I am not too familiar with SVG stuff, but perhaps this project can help. You’re basically just trying to render SVG files using OpenGL, right?

http://svgl.sourceforge.net/

Hello!

Jeh, i am familiar with .SVG readers,

( i only wroted about .SVG on my first post, sorry, im currently on .JVF, thats my own file format converted from .SVG… )

reason for .JVF is that the .SVG is a such a big file format,
i have converted my .SVG files to 1/5 of their original size by making this new file format JVF ( Java Vector File ) and still shrinking to 1/9 th,
i am now using .JVF files with my projects…

i need to know what to study in JOGL to draw my filled/stroked polycurves/lines to GLCanvas !!
what is JOGL equilevant for AWT GeneralPath ??

is there any ??

//----

thanks,

Ok, I have not exactly done any of this myself, but I am trying to point you in the right direction, so bare with me…
Now, OpenGL is pretty low level, so there is no “GeneralPath”-like class that you can just call, you have to implement curve/path rendering on your own, i.e. use some math :wink:

First, I would explore gamedev.net forums, as I am sure people have asked this before there. I found this post which might give you some idea of what you’re getting yourself into, and at the very least some buzz words that will be useful for further research. I think bezier curves and NURBS are what you’re looking for.

http://www.gamedev.net/community/forums/topic.asp?topic_id=378739

After you’ve read that, this paper should give you a pretty solid intro to one of the popular approaches on how curves are done in OpenGL:

http://www.mat.ucsb.edu/~c.ramakr/articles/dls/nurbs.pdf

Hope that helps