Advertisement

Animated textures?

Started by August 15, 2000 01:15 AM
2 comments, last by Serui 24 years, 3 months ago
Would it be possible to load multiple images as textures and then make these animate? If I use a quad as a plane, and then used texture objects to load a number of the images for implementation. Would this take to much memory?
actually, the way they do it is with gltexsubimage(). look it up. i haven''t done it myself yet, but this is the way i''m gonna do it. of course, you''ll have to provide your own timing scheme, but this is how i would think they would do it. you load up an image, then use gltexsubimage to replace it with a different part of another image to offset image at a certain frame number.

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Advertisement
I have created a cAnimation class and it works like this:

CAnimation anim;

anim.SetTarget1(&(Vertex(N).U));
anim.SetType1(LINEAR,MIN,MAX,inc,LOOP);
anim.SetTarget2(&(Vertex(N).V));
anim.SetType2(LINEAR,MIN,MAX,velocity,LOOP);
anim.Enable(1);
anim.Enable(2);

And this is it!

the textures coordinates changes and this produce an animation.
This class can animate anything. Just give it the pointer.

(tis class can animate in the maxium 8 coordinates)


PROgrammer
Thanks, I''ll study subimage. By the way Programmer, may I ask what you used to implement the cAnimation class?

This topic is closed to new replies.

Advertisement