Archived

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

uuh..background stuff

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

make the background on a texture eg 512x512 repeat texture
+ for sideways scrolling of 1 texel per frame use

static float posx=0.0;
static float offset=(1.0/512.0);

posx+=offset;
if ( posx>1.0 )
posx-=1.0;
glBegin( GL_QUADS );
glTexCoord2f(0+posx,0);
glTexCoord2f(0+posx,1);
glTexCoord2f(1+posx,1);
glTexCoord2f(1+posx,0);
glEnd();

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
If the quad takes up the entire screen and is textured, it could slow down the app. Instead, I would go about rendering multiple, seperate quads, with the ability to change the array size during run time. (assuming you use an array)

[edited by - masterg on May 3, 2002 6:53:13 PM]

Share this post


Link to post
Share on other sites