Over the past month or so, I went broke trying to learn DirectX. So I got mixed up between DirectX 9 and 10. One of the main changes that I saw in these two is how to handle vectors on a video card.
One of the radical changes that I notice is how you get the GPU to recognize your structures. In DirectX 9, you define flexible vertex formats.
Your typical setup would be this:
#define CUSTOMFVF (D3DFVF_XYZRHW | D3DFVF_DIFFUSE)
In DirectX 10, I believe the equivalent is a description of the top of the input:
D3D10_INPUT_ELEMENT_DESC layout[] = { {"POSITION",0,DXGI_FORMAT_R32G32B32_FLOAT, 0 , 0, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"COLOR",0,DXGI_FORMAT_R32G32B32A32_FLOAT, 0 , 12, D3D10_INPUT_PER_VERTEX_DATA, 0} };
I noticed in DirectX 10 that it is more descriptive. Other than this, what are some of the significant changes and the HLSL syntax is the same for both?
c ++ c directx
numerical25
source share