• Advertisement
Sign in to follow this  

Vertex buffer formats

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

It looks like you can't have ints, doubles, or less-than-3 unsigned bytes as elements. Am I understanding the documentation correctly?

Share this post


Link to post
Share on other sites
Advertisement
Nope, just look at the D3DDECLTYPE page. This enumeration consists of all the data types that you can map to in a vertex element. Here are a few of the basic datatypes:


D3DDECLTYPE_FLOAT1 float
D3DDECLTYPE_FLOAT2 float[2] or D3DXVECTOR2
D3DDECLTYPE_FLOAT3 float[3] or D3DXVECTOR3
D3DDECLTYPE_FLOAT4 float[4] or D3DXVECTOR4
D3DDECLTYPE_D3DCOLOR DWORD or D3DCOLOR
D3DDECLTYPE_UBYTE4 byte[4]
D3DDECLTYPE_SHORT2 short[2]
D3DDECLTYPE_SHORT4 short[4]




However, it is possible that not all of the datatypes listed on that page are supported in hardware. The 9800xt only supports the commonly-used types and:


UBYTE4
UBYTE4N
SHORT2N
SHORT4N
USHORT2N
USHORT4N
UDEC3
DEC3N


Share this post


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

  • Advertisement