I found out how to tesselate complex polygons, but the textures are mapped per triangle (generated by the Tessfunctions) and not over the whole polygon.
What can I do ? Please help me…
int g_nTexIndex; // number of texturcoord i have to use
GLdouble *g_pdTexCoords; // pairs of generated texturecoords
I tried to put the glTexCoord2d() in the callback for the gluTessVertex() and see some sort of effect of a texture, but not the texture itself.
I use an array of five doubles, par vertex: x, y, z, u & v.
check the last two values (for the texturecoords) of your pointerarray. I think they have not the values you wish, because the pointer in the callback-function is the same pointer you have to give to the gluTessVertex-function and this pointer only takes three parameters.
This is the reason why i use global variables.
If it works then you must see your textures but then you have the same problem i have - flipping textures which are mapped per triangle.
Originally posted by ST2000: If it works then you must see your textures but then you have the same problem i have - flipping textures which are mapped per triangle.
I tried with a global list of coords, like u said but I only see a color effect on the surface. No recognizable pixels! I see the effect of mipmapping though (i guess).