i have a porblem. i used a tessellation for draw a polygon and now i would put a texture on the polygon.
i used this code to draw the polygon, in the callback i put this code:
void CALLBACK vertexCallback(const GLvoid *vertex)
{
const tutti ptr = (const tutti)vertex;
glTexCoord2f(ptr->x_tex,ptr->y_tex);
glVertex3d(ptr->x_coord1, ptr->y_coord1, ptr->z_coord1);
}
i would like to know why my texture is not placed in polygon even though i put glTexCoord2f before glVertex3d.
i put glEnable(GL_TEXTURE) of course but the texture is no placed.
can someone help me to resolve this problem??
thanks!!