Skip to main content
gamedev.net
🔒 Locked

texture coordinates

Started by Emexus Jan 19, 2004 at 1:49 PM 1 replies 250+ views
Original Post
Emexus
Emexus
hi all, ive been playing around with some opengl using nehe's tutorials but im confused about the texture coordinates for a quad. glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, 1.0f, 0.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, 1.0f, 0.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f( 1.0f,-1.0f, 0.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f,-1.0f, 0.0f); the image is completly out, can someone explain, how i go about placing the image properly? cheers for any help [edited by - Emexus on January 19, 2004 2:50:49 PM]
Ostsol
Ostsol
Texcoord (0,0) should be at the bottom-left of the face. In your case, it should be at vertex coord (-1,-1,0).
-Ostsol
Emexus
Emexus
thats great thanks i understand it now

cheers Ostsol

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.