Original Post
I have the following vertex declaration (Direct3D 9.0):
D3DVERTEXELEMENT9 VertexPosNormalTexture[] =
{
{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
{0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0},
{0, 24, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0},
D3DDECL_END()
};
... and I populate my vertex buffer with VertexPosNormalTexture vertices.
Question:
Is it possible to disable/enable one of the components of this declaration in run-time? For example, I would like to turn off D3DDECLUSAGE_TEXCOORD sometimes in order to show the material of the object instead of its texture.
D3DVERTEXELEMENT9 VertexPosNormalTexture[] =
{
{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
{0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0},
{0, 24, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0},
D3DDECL_END()
};
... and I populate my vertex buffer with VertexPosNormalTexture vertices.
Question:
Is it possible to disable/enable one of the components of this declaration in run-time? For example, I would like to turn off D3DDECLUSAGE_TEXCOORD sometimes in order to show the material of the object instead of its texture.