[solved] whats wrong with this quad?

Started by
9 comments, last by Norman Barrows 7 years, 2 months ago

solved.

incorrect:

D3DVERTEXELEMENT9 vertex_format[] =
{
' stream 0, offset 0, float3, no tesselation, position, usage index 0
{ 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 },
' stream 0, offset 0, float3, no tesselation, normal, usage index 0
{ 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0 },
' stream 0, offset 0, float2, no tesselation, tex coords, usage index 0
{ 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 },
D3DDECL_END()
};
correct:
D3DVERTEXELEMENT9 vertex_format[] =
{
' stream 0, offset 0, float3, no tesselation, position, usage index 0
{ 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 },
' stream 0, offset 12, float3, no tesselation, normal, usage index 0
{ 0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0 },
' stream 0, offset 24, float2, no tesselation, tex coords, usage index 0
{ 0, 24, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 },
D3DDECL_END()
};
it was the offsets in the vertex elements.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

This topic is closed to new replies.

Advertisement