Archived

This topic is now archived and is closed to further replies.

Texture Mapping on a Triangle

This topic is 6021 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

this might seem kinda silly but how do i map a square texture onto a Triangle, a texture having 4 corners and the triangle only 3 :o/ cheers

Share this post


Link to post
Share on other sites
  
glBegin(GL_TRIANGLES);
glTexCoord2f(0.0f,0.0f); glVertex3f(-1.0f,0.0f,0.0f);
glTexCoord2f(1.0f,0.0f); glVertex3f(1.0f,0.0f,0.0f);
glTexCoord2f(0.5f,1.0f); glVertex3f(0.0f,1.0f,0.0f);
glEnd();

somethin'' like that.

HHSDrum@yahoo.com
Polarisoft Home Page

Share this post


Link to post
Share on other sites