Jump to content
  • Advertisement
Sign in to follow this  
VanillaSnake21

DX11 Dealing with D3DX____ functions being depricated.

This topic is 1027 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to upgrade my framework to DX11 in hopes of then upgrading it to 12 (right now it's on 10) but I was a little lazy when creating it in the first place and just used the helper utilities in D3DX even though they were deprecated a long time ago. So now I've got Windows 10 and it doesn't even ship with D3DX so I'm forced into switching. It's a lot of code and pretty laborious. I've managed to switch all my math to newer DirectXMath but what about effects? I can't find any references to effects in DirectX12 documentation and have no idea what happening there. It seems like .fx files are no longer used is that true? And without the D3DX lib how do I load the effects file now? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
My share:
- technically it's no biggy to use d3dx (including math functions) in windows 10. For this you need the right headers and libs
- d3d11 also has an effects library, although in your case you have to rebuild the lib's (debug and release) on your machine to be able to use them (the VS project can easily be found online)

What I did is step by step:
- migrated from d3dx math do directxmath in my existing d3d9 engine
- now moving from d3d9 to d3d11, but with using d3d11 effects

When I feel confident and finish that step, I'll move to creating "my own shader / effects management", by using the different "direct shader compilers and functions" in d3d11.

For model loading you can use assimp (possibly to create/ convert to a DIY format that your engine/applications uses most efficiently).

Doing it all at once was too big of a jump for me personally.

Share this post


Link to post
Share on other sites

@ryan20fun thanks, I'm aware of that page already, it's been a lifesaver.

 

@cozzie yes, I still have all the old sdks on my other partition so it complited and ran fine, but I really don't want to hang on to old, unsupported code for too much longer. I got my Windows SDK and just want to use that from now on. 

 

So we have to write our own shader system from now on? I do know that DX11 has a github support for DX functions which we can compile, but like I said my main goal right now is to switch to DX12 and DX11 is just a stepping stone. I don't want to go through all the work and then find out it's completely unsupported in DX12. I just can't find any documentation on effects in DX12. It just seems Microsoft is moving DirectX towards high end publishers, soon it's going to be all low-level bare bones code and we'll have to write our own utilities for it. 

Share this post


Link to post
Share on other sites

One thing you could do is to install the DXSDK from June 2010 and use the libraries from there, of course this is not recomended by MS I guess but it is an option.

 

If you don't want this option you could still install that version of the SDK, because there was a sample that basically implements FX for d3d11.

 

Of course if you can afford it you should stop using this (incredibly cool in my opinion) library, this should be an long term investment.

Edited by imoogiBG

Share this post


Link to post
Share on other sites
I really doubt that you're ever going to see a Effects library for DX12. Huge parts of it would have to be written in order to support things like the new resource binding model, PSO's, and manual memory management/synchronization.

Share this post


Link to post
Share on other sites

@imoogiBG I have the June '10 SDK on my other partition and right now the code works and compiles because I'm still using it, but I'd like to upgrade it. I'm downloading the github fx11 project now I think it's the same one you mentiontined but updated.

 

@MJP so if I compile the fx11 from github I would have to completely dump it once I move to DX12?

 

Also why is there so little info on DX12 programming, RasterTalk has 3 tutorials, last one created yesterday and then there's the Programming Guide from Microsoft, but has no reference code at all? DX12 is what about a year old now? I mean it was released to developers a while ago right since the games are bout to start coming out this or next month. It's weird that nobody started any series similar to what Bobby Anguelov did with DX10. There's a book by Frank Luna coming out in Decemeber but I think that guy jumps on on any release headlessly just to make a book.

Share this post


Link to post
Share on other sites

@MJP so if I compile the fx11 from github I would have to completely dump it once I move to DX12?


Yes. None of it will work with D3D12. You *might* be able to update Effects11 to work with the interfaces from D3D12's "11on12" layer, but that still might be a lot of work. Even if you could, it wouldn't really make very much sense. D3D12 is all about achieving low CPU overhead by exposing more direct access to memory and revamping the binding model. If you're not going to take advantage of those things, then you'll probably just end up spending a lot of time making an engine that runs slower than it would in D3D11.

Also why is there so little info on DX12 programming, RasterTalk has 3 tutorials, last one created yesterday and then there's the Programming Guide from Microsoft, but has no reference code at all? DX12 is what about a year old now? I mean it was released to developers a while ago right since the games are bout to start coming out this or next month. It's weird that nobody started any series similar to what Bobby Anguelov did with DX10. There's a book by Frank Luna coming out in Decemeber but I think that guy jumps on on any release headlessly just to make a book.


Windows 10 just came out a little while ago, it's still really early. There were some developers in the early access program, but even then things were incomplete for a long time and you had to work on pre-release builds of Windows. Now that the API's and documentations are publicly available, you'll see the ecosystem start to slowly build up. It was the same way with D3D9->D3D10, or D3D10->D3D11: it took a long time for people to transition.

Also I'm not sure if you're aware, but Microsoft has posted some D3D12 sample code on GitHub.

Share this post


Link to post
Share on other sites

 

@MJP so if I compile the fx11 from github I would have to completely dump it once I move to DX12?


Yes. None of it will work with D3D12. You *might* be able to update Effects11 to work with the interfaces from D3D12's "11on12" layer, but that still might be a lot of work. Even if you could, it wouldn't really make very much sense. D3D12 is all about achieving low CPU overhead by exposing more direct access to memory and revamping the binding model. If you're not going to take advantage of those things, then you'll probably just end up spending a lot of time making an engine that runs slower than it would in D3D11.

Also why is there so little info on DX12 programming, RasterTalk has 3 tutorials, last one created yesterday and then there's the Programming Guide from Microsoft, but has no reference code at all? DX12 is what about a year old now? I mean it was released to developers a while ago right since the games are bout to start coming out this or next month. It's weird that nobody started any series similar to what Bobby Anguelov did with DX10. There's a book by Frank Luna coming out in Decemeber but I think that guy jumps on on any release headlessly just to make a book.


Windows 10 just came out a little while ago, it's still really early. There were some developers in the early access program, but even then things were incomplete for a long time and you had to work on pre-release builds of Windows. Now that the API's and documentations are publicly available, you'll see the ecosystem start to slowly build up. It was the same way with D3D9->D3D10, or D3D10->D3D11: it took a long time for people to transition.

Also I'm not sure if you're aware, but Microsoft has posted some D3D12 sample code on GitHub.

 

 

Thanks, great explanation. I was totally not aware of that sample page. In view of all that I'm going to go straight to 12, I've got a feeling that industry will transition to that much faster then other builds considering the advantages. Thanks, cheers.

Share this post


Link to post
Share on other sites

Good to hear.

But keep in mind that you take things bite by bite, moving at once to:

- a different math library

- a new d3d/ api version

- loading models using another library

- having the make your own shader manager ("effects")

 

Is quite difficult to take all at once.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!