Original Post
I try to keep my vertex structure padded to a multiple of 32 bytes but whenever I do that I get this warning, spammed in my output window 100's of times a second. "D3D(WARN): Stream 0 stride and vertex size, computed from the current vertex declaration or FVF, are different, which might not work with pre-DX8 drivers" If I take out the padding it wont give me that warning. Here is the code I use for creating a vb and setting the stream So how do I pad my structure to a multiple of 32 bytes without getting that annoying warning?
#define D3DFVF_CUSTOM ( D3DFVF_XYZ | D3DFVF_DIFFUSE )
struct CUSTOM_FVF
{
D3DXVECTOR3 m_position;
D3DCOLOR m_color;
char pad[16];
};
g_pDevice->CreateVertexBuffer(
8 * sizeof( CUSTOM_FVF ), // byte size of buffer
0, // flags
D3DFVF_CUSTOM, // FVF format
D3DPOOL_DEFAULT, // memory pool
&g_pVertexBuffer, // stored buffer
NULL );
g_pDevice->SetStreamSource( 0, g_pVertexBuffer, 0, sizeof( CUSTOM_FVF ) );