Playing animation on surfaces?

Hi, I’m a beginner to GLSL. I mainly an artist and know a tiny bit about programming etc.

I would like to know if there is anyway to play animations on the faces of the objects using GLSL. By animations I mean either a series of frames or an a AVI.

What I have figured out is that I can move the texture mapping co-ordinates in steps at a certain framerate over a texture map that has all the frames of my animation in it. This creates the illusion of motion like normal animations etc.

I would like to know if there is a better of doing this or if there some specific code that deals with this? Putting all the frames of an animation into a texture map can create large texture maps. Any help would be awesome thanks

Best bet would be to do some sort of paging to/from the GPU.

I’m using libavcodec (for avi decoding) in conjunction with a texture rectangle for storage. Each frame, I call glTexSubImage2D to update the texture data. It’s probably best to use pixel buffer objects for asynchronous uploads so that the rendering pipeline does not stall while uploading the texture.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.