jacobholm

10-21-2010, 04:37 AM

I send in the vertices to tessellator (see image) using gluTessVertex().

http://img199.imageshack.us/img199/22/tessellation.jpg

As you can see it's a "quad" with an indent. I have registered my own GLU_TESS_VERTEX callback, tessVertexCB(). If I understand correctly this function will be called for each vertex, in the order of each triangle, i.e. the three first calls to this function will give me the first triangle, the next three calls will give me the second triangle etc.. Am I wrong?

These are the triangles I am getting (by index as in image):

1st. 1, 4, 5

2nd. 4, 1, 3

Already here the second triangle is wrong, i was expecting 2 as the last point in the second triangle. If vertex nr 4 is farther to the right the triangle 4, 1, 3 will intersect the 5, 4 line. Have I misunderstood how this works?

Regards,

Jacob

http://img199.imageshack.us/img199/22/tessellation.jpg

As you can see it's a "quad" with an indent. I have registered my own GLU_TESS_VERTEX callback, tessVertexCB(). If I understand correctly this function will be called for each vertex, in the order of each triangle, i.e. the three first calls to this function will give me the first triangle, the next three calls will give me the second triangle etc.. Am I wrong?

These are the triangles I am getting (by index as in image):

1st. 1, 4, 5

2nd. 4, 1, 3

Already here the second triangle is wrong, i was expecting 2 as the last point in the second triangle. If vertex nr 4 is farther to the right the triangle 4, 1, 3 will intersect the 5, 4 line. Have I misunderstood how this works?

Regards,

Jacob