c++ - how to calculating D3DVERTEXELEMENT9 stream and offset -


i'm trying learn how use d3dvertexelement9 simple directx 9 app. i've been looking @ tutorials this, don't explain how fill in stream , offset.

i've seen examples this:

d3dvertexelement9 simple_decl[] = {   {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() }; 

but how know number put in offset(in case it's 12 , 24 normal , texcoord).

also, stream set 0?

please help.

thanks


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -