To gif or not to gif...?
That is the question! Having searched a bit I didn't find any way to get gifs to work in OpenGL. Don't really know how to make models(except one polygon at a time x_x) so was hoping to use gifs for some cheap animations. Can anyone point me in the right direction or is this just one of those "you don't get to" type of things? Thanks for reading, -Xav
You want to use animated gifs? Humm.. I never tried that, but what does work is take the single frames and either store them as separate images and just create loads of OpenGL textures which you then cycle through.
Another way (and thats probably faster) is placing the single frames on a grid in one bigger texture. So lets say you have a 32x32 image you want to animate with 16 frames, you can create a 128x128 texture placing a 4x4 grid of frames along these. Then you just need to vary the texture coordinates.
Hope that helps..
Another way (and thats probably faster) is placing the single frames on a grid in one bigger texture. So lets say you have a 32x32 image you want to animate with 16 frames, you can create a 128x128 texture placing a 4x4 grid of frames along these. Then you just need to vary the texture coordinates.
Hope that helps..
Member of the NeHe team | PhD Student at Heidelberg Collaboratory for Image Processing | ProCamera Developer
Ya I have done the first of your suggestions before caste, and it actually worked ok, but not great. Then again, several bitmaps(when implemented correctly) use about the same amount of disk space as one gif. The second one I must admit sounds intriguing...I'll figure out something. If anyone else saw a function or something for this in some obscure place lemme know! Thanks again Caste! -Xav
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement