简体   繁体   English

DirectX11加载Gif纹理

[英]DirectX11 Load Gif texture

Few years ago, I used D3DX10CreateTextureFromFile to load a .gif texture to ID3D10Resource* . 几年前,我使用D3DX10CreateTextureFromFile将.gif纹理加载到ID3D10Resource* But nowdays D3DX is deprecated. 但是如今不推荐使用D3DX Which function can I use to load such a format? 我可以使用哪个函数来加载这种格式?

I found DirectXTex texture processing library: 我发现了DirectXTex纹理处理库:
https://directxtex.codeplex.com/wikipage?title=WICTextureLoader 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. D3DX对实用程序代码采用了“一切皆有可能”的方式,因此它是游戏或应用程序部署到客户时可能会使用的“运行时”内容的组合,并且具有“工具和构建时间”通常不属于游戏或应用程序生产版本的内容。

You should consider using DirectX Tool Kit which contains the WICTextureLoader module. 您应该考虑使用包含WICTextureLoader模块的DirectX工具套件 DirectX Tool Kit is intended as a replacement for usage of D3DX at runtime for games and application. DirectX工具套件旨在替代D3DX在游戏和应用程序运行时的使用。

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. DirectXTex旨在替代使用D3DX的内容和构建工具,尽管该软件包还包含WICTextureLoader的“独立”版本,也适用于出于某些原因不想使用DirectX工具包的人们。

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. 有关为什么有WICTextureLoader的两个副本以及DirectXTex本身和此模块之间有重叠的部分,请参见此博客文章,以获得一些详细的历史记录。

Generally for D3DX replacement suggestions, see Living without D3DX 通常,有关D3DX更换建议,请参阅不带D3DX居住

For legacy DirectX SDK replacement suggestions more broadly, see: 有关更广泛的旧版DirectX SDK替换建议,请参阅:

MSDN MSDN

DirectX SDK Samples Catalog DirectX SDK样本目录

DirectX SDK Tools Catalog DirectX SDK工具目录

DirectX SDKs of a certain age 特定年龄的DirectX SDK

Note a similar question was answered before here . 请注意,在之前回答了类似的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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