JOGL and SVG Vector graphics.

Hello!

I made an simple .SVG reader with Java.

Now im trying to learn a bit of JOGL, i have a following image as an example of my problem.

http://www.lautapelisuomi.eu/Polygon.png

why is this so, that, my polygons wont look like the first “ship”, but they seem to be drawn as a image of the right “ship”.

all my 4 coordinates are right, but i dont get the results i need/want.

is this because of a CULL_FACE i tryed it but didnt help.

i only get an triangle, but i have 4 vertexes.

gl.glbegin ( gl.gl_polygon )
gl.glvertex (..);
gl.glvertex (..);
gl.glvertex (..);
gl.glvertex (..);
gl.glend();

//----

Thanks,

This is because OpenGL only supports CONVEX polygons and that one is a non-convex polygon.

You need to cut it into two triangles.