Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


Loading texture from file


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 GuardianX   Crossbones+   -  Reputation: 1527

Like
0Likes
Like

Posted 07 February 2013 - 06:05 AM

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.


Edited by GuardianX, 07 February 2013 - 06:11 AM.


Sponsor:

#2 Tordin   Members   -  Reputation: 604

Like
1Likes
Like

Posted 07 February 2013 - 10:52 AM

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"

#3 MJP   Moderators   -  Reputation: 11859

Like
1Likes
Like

Posted 07 February 2013 - 03:54 PM

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.



#4 GuardianX   Crossbones+   -  Reputation: 1527

Like
0Likes
Like

Posted 08 February 2013 - 12:52 AM

Thank you guys. You have helped me alot.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS