简体   繁体   中英

DirectX11 Load Gif texture

Few years ago, I used D3DX10CreateTextureFromFile to load a .gif texture to ID3D10Resource* . But nowdays D3DX is deprecated. Which function can I use to load such a format?

I found DirectXTex texture processing library:
https://directxtex.codeplex.com/wikipage?title=WICTextureLoader

D3DX had a 'everything and the kitchen-sink' approach to utility code, so it was a mix of 'runtime' things that a game or application might use when it was deployed to a customer, and it had 'tools and build-time' things that are not typically part of a production build of a game or application.

You should consider using DirectX Tool Kit which contains the WICTextureLoader module. DirectX Tool Kit is intended as a replacement for usage of D3DX at runtime for games and application.

DirectXTex is intended as a replacement for usage of D3DX for content and build tools, although that package also contains a 'standalone' version of WICTextureLoader as well for people who don't want to make use of the DirectX Tool Kit for whatever reason.

See this blog post for some detailed history here on why there are two copies of WICTextureLoader and overlap between DirectXTex itself and this module.

Generally for D3DX replacement suggestions, see Living without D3DX

For legacy DirectX SDK replacement suggestions more broadly, see:

MSDN

DirectX SDK Samples Catalog

DirectX SDK Tools Catalog

DirectX SDKs of a certain age

Note a similar question was answered before here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM