Loading texture from file

Started by
2 comments, last by iskatsu 11 years, 2 months ago

Hello.

I have a fairly simple question regarding loading texture mechanism in new Windows 8 Direct3D SDK.

So far I see that all CreateShaderResourceFromFile, CreateTexturedFromFile and other functions are deprecated and wiped out. Microsoft suggests to use DirectXTex third-party library for operations with textures. In previous SDK's it was very simple to just create DDS file and then load it as resource/texture/whatever. But now they are pushing us to use third-party library.

It would be okay for me, but as I'm learning DX myself, I want to load DDS files by using my own framework (kind of) so that I can actually understand how does loading data from file to D3D pipeline occure. I looked at Win8SDK DX tutorials and DirectXTex code, but they are complicated and demand lots of time to understand how things are going inside them.

Can you guys suggest some references to learn how can I load textures in D3D11 by myself without using third-party solutions?

Thanks.

Advertisement

If you take a look at this site : http://msdn.microsoft.com/en-us/library/windows/desktop/bb943991(v=vs.85).aspx

You will find a detaild guide on how the bytes are pack in the header and how you later can use them for textures and how you bind data to your texture.

This is all withing the dds fileformat! realy neat.

"There will be major features. none to be thought of yet"

Well to be completely fair DirectXTex isn't exactly "third-party", since it's been developed by MS employees. But I do agree that it does suck that you have to download an additional library to get basic texture support.

Anyway, I would suggest looking a the DDS texture loader from DirectXTK. It's a much simpler loader than the one you'll find in DirectXTex, and it's specifically designed to be easy to drop in so that you can load textures at runtime.

Thank you guys. You have helped me alot.

This topic is closed to new replies.

Advertisement