directx 9 hlsl vs. directx 10 hlsl : syntex the same.

Posted by numerical25 on Stack Overflow See other posts from Stack Overflow or by numerical25
Published on 2010-05-18T01:07:04Z Indexed on 2010/05/18 1:10 UTC
Read the original article Hit count: 316

Filed under:
|
|
|

For the past month or so I been busting my behind trying to learn directx. So I been mixing back back and fourth from directx 9 to directx 10. One of the major changes I've seen in the two is how to process vectors in the graphics card.

one of the drastic changes I notice is how you get the gpu to recognize your structs. In directx 9 you define the Flexible Vertex Formats

your typical set up would be like this...

#define CUSTOMFVF (D3DFVF_XYZRHW | D3DFVF_DIFFUSE)

in directx 10 I believe the equivalent is the input vertex description

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 notice in directx 10. it is more descriptive. besides this, what are some of the drastic changes made. and is the hlsl syntax the same for both.

© Stack Overflow or respective owner

Related posts about directx

Related posts about game-development