typedef struct {
FLOAT x, y, z; // 2-D coordinates
FLOAT rhw; // rhw
FLOAT u, v; // Texture coordinates
} sVertex_2D;
#define VERTEXFVF_2D (D3DFVF_XYZRHW | D3DFVF_TEX1)
D3DVERTEXELEMENT9 decl_2D[] =
{
// offsets in bytes
{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
{0, 12, D3DDECLTYPE_FLOAT1, D3DDECLMETHOD_DEFAULT, ??, 0},
{0, 16, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0},
D3DDECL_END()
};
VertexDeclaration for RHW
How do I define the VertexDeclaration for the RHW?
[Edited by - akira32 on March 20, 2008 5:11:45 AM]
Thank you,jollyjeffers.
I had solved it.
Mapping FVF Codes to a Direct3D 9 Declaration (Direct3D 9)
[Edited by - akira32 on March 20, 2008 6:11:18 AM]
I had solved it.
D3DVERTEXELEMENT9 decl_2D[] = { // offsets in bytes {0, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITIONT, 0}, {0, 16, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, D3DDECL_END()};
Mapping FVF Codes to a Direct3D 9 Declaration (Direct3D 9)
[Edited by - akira32 on March 20, 2008 6:11:18 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement