• Advertisement
Sign in to follow this  

[C++][DX 10] Animated Gifs

This topic is 3192 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
There is a Texture2DArray resource that should work out nicely for this.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement