openGL textures
i am making a 3d pong game using opengl. i created a ''paddle'' class for the paddles. everything is fine until i try to texture map the paddles. i don''t fully understand the glTexCoord2f(...) function. I draw my paddles using GL_QUADS (w/ help from nehe''s tuts). my paddles have a width of 3.0f, a height of 0.5f, and a depth of 0.5f. how in the world do i get my texture onto the stupid paddle?!? my paddle is centered around a vertex if this helps any. any help would be appreciated.
#define ignite_software 1
hey uploaded a version of pong yesterday to me site
glBegin(GL_QUADS)
glTexCoord2f(0,0); glVertex3f(0.0, 0.0 ,0.0 );
glTexCoord2f(1,0); glVertex3f(3.0, 0.0 ,0.0 );
glTexCoord2f(1,1); glVertex3f(3.0, 0.0 ,0.5 );
glTexCoord2f(0,1); glVertex3f(0.0, 0.0 ,0.5 );
glEnd();
this is just for one side the texture will be a bitsquashed if its a 1 to 1 size.
btw youre welcome to have a look and expand my pong/breakout game source is included
http://members.xoom.com/myBollux
glBegin(GL_QUADS)
glTexCoord2f(0,0); glVertex3f(0.0, 0.0 ,0.0 );
glTexCoord2f(1,0); glVertex3f(3.0, 0.0 ,0.0 );
glTexCoord2f(1,1); glVertex3f(3.0, 0.0 ,0.5 );
glTexCoord2f(0,1); glVertex3f(0.0, 0.0 ,0.5 );
glEnd();
this is just for one side the texture will be a bitsquashed if its a 1 to 1 size.
btw youre welcome to have a look and expand my pong/breakout game source is included
http://members.xoom.com/myBollux
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement