View Full Version : Scrolling an image inside a texture
What's the way to scroll an image (of any size) inside a texture using a Hardware method ?!
Otherwise, what's the solution the cheapest ?!
08-15-2000, 10:09 PM
Move the TexCoords to any number with s,t-wrap modes GL_REPEAT or use the texture matrix for translation of the texture space.
The first means if you have a simple quad with texture coordinates from 0.0 to 1.0, add 0.1 to every coordinate to move the texture one tile in 10 steps.
Texture coordinates from 1.0 to 2.0 show the identical image like 0.0 to 1.0 with wrap repeat. There is no need to have coordinates over 2.0 in this example.
The other method is to select the texture matrix and issue glTranslate calls for the s,t components, without changing the glTexCoords.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.