Archived

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

branhield

uuh..background stuff

Recommended Posts

zedzeek    528
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
masterg    100
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