microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.45k stars 369 forks source link

WICTextureLoader and DDSTextureLoader feature request #138

Closed cpyburn closed 1 year ago

cpyburn commented 1 year ago

DirectXTex returns ScratchImage that I can get properties of the image like size, width, etc. The functions in DirectXTK do not. I was really hoping when I saw these functions in DirectXTK that they would return the same information. Can you add this in a future release? It would be nice to have one less reference to another project when these functions exist. They do almost the exact same thing. They just dont return the data I need without going to modify DirectXTK source.

walbourn commented 1 year ago

DirectXTex is intended for tools usage where you often work with the image bitmap in memory with the CPU. If you are just wanting a way to load Direct3D resources from disk, the DirectX Tool Kit functions are best. You can get the resource metadata directly from the Direct3D resource object returned from the loader using the ID3D12Resource::GetDesc method.

walbourn commented 1 year ago

See also the wiki here and here.

cpyburn commented 1 year ago

Thanks, I try that.