Jump to content
  • Advertisement
Sign in to follow this  
akira32

VertexDeclaration for RHW

This topic is 3749 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

How do I define the VertexDeclaration for the RHW?
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()
};

[Edited by - akira32 on March 20, 2008 5:11:45 AM]

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!