I was able to assign texture coordinates to four vertices assign
I want to texture a polygon. How to assign coordinates to the other two coordinates. The following is the code I have written.
glBindTexture(GL_TEXTURE_2D,texName[2]);
glBegin(GL_POLYGON);
glColor3f(0.0,0.0,0.95);
glTexCoord2f(0.0,0.0);
glVertex3f(0.0,0.0,0.0);
glTexCoord2f(0.0,1.0);
glVertex3f(1.0,0.0,0.0);
glTexCoord2f(1.0,1.0);
glVertex3f(1.0,1.0,0.0);
//glColor3f(0.0,1.0,0.0);
glTexCoord2f(1.0,0.0);
glVertex3f(0.5,1.5,0.0);
glVertex3f(0.0,1.0,0.0);
glEnd();
Regards