How can I render only a portion of a texture in GLSL?

Can I render a portion of a texture using only GLSL? I’d like to animate a sprite sheet on a quad, and I know how to render a portion of the tex when I’m initializing a mesh, but what about during the loop using GLSL? I’m pretty sure I’d have to pass in a uniform with “time passed” in order to animate, but how would I crop the texture in GLSL?

the only thing you have to submitt to the shader is (animated) texture coordinates (vec2)
if you want to calculate the animation on the gpu, you can pass the passed frame time as a uniform
but you can also do the animation offline and just send the resulting data (texture coords) to the shader

[QUOTE=john_connor;1283809]the only thing you have to submitt to the shader is (animated) texture coordinates (vec2)
if you want to calculate the animation on the gpu, you can pass the passed frame time as a uniform
but you can also do the animation offline and just send the resulting data (texture coords) to the shader[/QUOTE]

Thanks again John!