[C++][DX 10] Animated Gifs

Started by
3 comments, last by Downie 14 years, 9 months ago
I read somewhere that DirectX does not support animated Gifs so how do you achieve animated textures in DX10? I know in DX9 you could use sprite sheets but can you do something similar in DX10? Thanks
Advertisement
There is a Texture2DArray resource that should work out nicely for this.
You mean just load all the GIF frames into a texture array and then switch between array elements based on time?

Cool. Thanks for the advice.
Quote:Original post by Downie
You mean just load all the GIF frames into a texture array and then switch between array elements based on time?

Cool. Thanks for the advice.


Just keep in mind that there is a limit of 512 array slices therefore you can only store 512 frames this way. If you need more you need to create texture atlases where multiple frames are stored at different positions in one slice.

There is another limit that guarantees only textures with up to 128 MB. But this shouldn’t hardly a problem with GIFs.
The number of frames shouldnt be a problem I am only making a loading icon, so it shouldnt need that many frames.

Thanks for the heads up though.

This topic is closed to new replies.

Advertisement