Open WilbertD opened 9 years ago
See also #34.
The current implementation of IL_NUM_IMAGES returns the number of images after the currently-bound image. So the result returned depends upon which frame you're currently on (eg if you're on the first frame of a 10 frame animation, IL_NUM_IMAGES will return 9. If you're on frame 2, it'll return 8. And so on.).
The animation support is really fuzzy. I'm planning to do some cleanup to clarify how it all works. Basically, I think that:
The obvious loop is:
num_frames = ilGetInteger(IL_NUM_IMAGES);
for(n=0;n<num_frames; ++n) {
ilActiveImage(n);
... do stuff with frame n...
}
But this doesn't work with the current code. I think it should.
Most of these same issues also apply to Mipmaps, Layers and Cubemap faces. And obviously, it gets even more complicated when you want to deal with, say, animated cubemaps with mipmap levels ;-) So I think my planned changes will break the API... but then I feel it's not too big a deal because the API is already pretty broken in this respect. Feedback welcome!
There seems to be some issues with IL_NUM_IMAGES: