Comments (1)
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:
- IL_NUM_IMAGES should always return the number of images in the whole animation, regardless of which frame you're on.
- ilActiveImage(N) should jump to frame N in the anim, rather than advancing N beyond the current frame (currently it advances N frames from the current one - see #34).
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!
from devil.
Related Issues (20)
- Compiling on freebsd13.0 fails HOT 1
- 1.8.0: build fails
- SOVERSION bump needed?
- suppert webp?
- Build fails with strict-aliasing violations
- Error in installation! HOT 1
- Confusion over Bpp and Bpc
- Hello, there is no 64-bit Debug version under the window HOT 1
- Related to GLUT for Ubuntu installation
- iluGammaCorrect
- libILUT.so: undefined reference to `gluBuild2DMipmaps' HOT 1
- DXT Endpoint detection problem
- How To Static Library Build HOT 1
- Invalid conversion from int to int HOT 3
- Implicit conversion from 'unsigned int' to 'float'
- 1.8.0: build fails HOT 3
- Building static libraries only applies to IL and not to ILU nor ILUT
- ilut_config.h need to install to include folder
- src-IL/src/il_states.c: 2 * bad compare ? HOT 1
- 1.8.0: build fails against jasper 3.0.x HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devil.