Skip to main content
GameDev.net gamedev.net
🔒 Locked

openGL textures

Started by jt_845s Nov 1, 2000 at 12:50 PM 1 replies 300+ views
Original Post
jt_845s
jt_845s
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
[source]#define ignite_software 1[/source]
zedzeek
zedzeek
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
jt_845s
jt_845s
cool game!

#define ignite_software 1
[source]#define ignite_software 1[/source]

Topic Locked

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

Sign in to reply to this topic.