Fill a non-convex polygon

Feb 20, 2012 at 5:08 PM

Hi, is there any example on how to create a non-convex polygon and fill it with a simple color and / or with a texture?

I need to draw many non-convex polygons and also i need to fill them with a specific color or textures. How can i do this with SharpGl?

Thanks in advance.

Coordinator
Feb 21, 2012 at 10:01 AM

OpenGL only renders convex polygons when you're using glBegin/glEnd. If you need to render concave polygons, you'll need to use glu tesselators:

http://glprogramming.com/red/chapter11.html

all glu tesselator functions are wrapped in SharpGL :)

Feb 21, 2012 at 2:17 PM

Thanks for your reply.

If you can put some samples on how to use tesselators with SharpGL, i really appreciate it.

Thanks again.