PDA

View Full Version : glu Tesselation.



ravishashi
05-21-2003, 04:21 PM
Hi,
I am trying to use the gluTess functions to tesselate the concave polygons I have and render them correctly. I have arranged it such that in the Vertex Callback I get the vertex index since I am drawing an indexed polygon.
Now if I tesselate a rectangle, I should be getting 6 callbacks for the 2 triangles resulting from the tesselation. I am getting only 4. Can someone please tell me what I might be doing wrong?

shashi

beginner620824
05-21-2003, 06:15 PM
I don't quite understand your problem. As i understand, firstly glu lesselate only takes contour not primitives/rectangle as input. Secondly you never know what kind of primitives and how many vertex tesselate will give back. The number of vertex depends on the primitive it is giving back(triangles, triangle_loop or triangle_strip). That means 2 triangles don't necssarily have 6 vertex if glu is using triangle_loop/strip.
you must decide which vertex belongs to which primitive in your own callback.