What are changes from directx 10 to 11? Ive written some code in directx 10 and I want to change it to directx 11. Is this just about quality and I can do it just by changing headrs and dll files or functions and way of coding have been changed? ing.
First, I need to say, that nothing will change if you just change your D3D10DoSomething()
functions to D3D11DoSomething()
. They will do same things. No passive gain. You must use new features explicitly to make your app better. Those features that D3D10 don't have: such as hardware tessellation, compute shader, many many other stuff. To code.
So, the main question is "do you really need this features"? Or, maybe, "will you need these features later"? Does your coding mates laughing when see your ancient D3D10 code?
If answer is yes:
DirectX 10 to 11 porting is very simple. It is just a joke compared to DirectX 9 to 10 porting.
Here is short and non-exhaustive list of things to do when porting D3D10 to D3D11:
#include <d3d10*>
to #include <d3d11*>
d3d10*.lib
to d3d11*.lib
in linker optionsDevice and Context creation:
Create*()
) and context responsible for state changing functionality (most methods are Set*()
/Get*()
). D3D10CreateDevice*
functions (now they've become D3D11CreateDevice*
), add additional ID3D11DeviceContext
parameter and also add parameters related to D3D_FEATURE_LEVEL
. (more about feature levels here)device->ChangeState()
calls to deviceContext->ChangeState()
Other stuff:
0
for the time until you don't need this functionality. If you get compiler errors related with number of arguments or "unable to convert parameter.." just find this function in DirectX 11 reference and see if you must add additional zero argument =)Shaders:
And here are additional tips from Microsoft : link, link.
Well, mostly done! Welcome to D3D11 world =)