Game Development Community

Scroller bug.

by Magnus Blikstad · in Torque Game Builder · 05/17/2007 (4:03 pm) · 1 replies

There's a bug with scrollers, simple enough to fix though.

You commented out this code:
//// Texture Matrix.
//glMatrixMode( GL_TEXTURE );
//// Offset Texture.
//glTranslatef( mTextureOffsetX, mTextureOffsetY, 0 );

But forgot to comment out this:
// Restore Texture Matrix.
glLoadIdentity();
glMatrixMode( GL_MODELVIEW );

So whatever is drawn after your scroller will have a whacked modelview matrix.
Just comment out the last two lines and all is good again.

#1
05/18/2007 (7:37 pm)
Well caught, thanks, updated for next release.