Advertisement Jump to content


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


Problem with texture coordinates

This topic is 6216 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

hi, i have a problem, when i draw polygons, the backfacing polys have horizontal mirrored textures.... my draw code looks like this: if (backface) glFrontFace(GL_CW); else glFrontFace(GL_CCW); glBegin(GL_TRIANGLES); for (int i = 0; i < numPoints; i++) { glTexCoord2f(s, t); glVertex3f(x, y, z); } note: i set backface for each poly manually, this variable is not calculated. and here is an example how i setup my quads (build from two triangles) and texture coords: x y z s t ---------------------------- v1 = 0, 0, 0, 0, 0 v2 = 100, 0, 0, 1, 0 v3 = 0, 100, 0, 0, 1 v4 = 100, 0, 0, 1, 0 v5 = 100, 100, 0, 1, 1 v6 = 0, 100, 0, 0, 1 i hope you can help me! thanks, gammastrahler Edited by - gammastrahler on January 12, 2002 10:07:12 AM Edited by - gammastrahler on January 12, 2002 10:08:18 AM

Share this post

Link to post
Share on other sites
If I get what your saying, you mean when you see the back of the polygon, it is flipped left to right, so if you had some text or something assymetrical for a texture, it would look all messed up. Well, if that is what you''re talking about, I don''t think you can get around that. The texture coordinates will stay the same, so unless you program it to flip them when you''re looking at the backside it WILL get messed up. Make sure the user can''t get around to look at the backside. Draw another quad if you need to.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!