I am trying to draw lines which represent the axis in my game for debugging purposes. Thing is i can't get them to be colored the lines are showing up properly though. When i look at the color values in pix they are not showing up as I set them.
//creation code
gd3dDevice->SetVertexDeclaration(VertexPC::Decl);
gd3dDevice->CreateVertexBuffer(6 * sizeof(VertexPC), D3DUSAGE_WRITEONLY,
0, D3DPOOL_MANAGED, &axis_Vb_, 0);
VertexPC* v = 0;
axis_Vb_->Lock(0, 0, (void**)&v, 0);
//x-axis RED
//D3DCOLOR_ARGB
v[0].pos = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
v[0].color = D3DXCOLOR( 1.0f, 1.0f, 1.0f, 1.0f);
v[1].pos = D3DXVECTOR3(1.0f, 0.0f, 0.0f);
v[1].color = D3DXCOLOR( 1.0f, 1.0f, 1.0f, 1.0f);
//y-axis GREEN
v[2].pos = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
v[2].color = D3DXCOLOR( 0.0f, 1.0f, 0.0f, 1.0f);
v[3].pos = D3DXVECTOR3( 0.0f, 1.0f, 0.0f);
v[3].color = D3DXCOLOR( 0.0f, 1.0f, 0.0f, 1.0f);
//z-axis BLUE
v[4].pos = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
v[4].color = D3DXCOLOR( 0.0f, 0.0f, 1.0f, 1.0f);
v[5].pos = D3DXVECTOR3(0.0f, 0.0f, 1.0f);
v[5].color = D3DXCOLOR( 0.0f, 0.0f, 1.0f, 1.0f);
axis_Vb_->Unlock();
//draw code
gd3dDevice->SetRenderState(D3DRS_COLORVERTEX, D3DSHADE_GOURAUD );
if(myDebugComponent->showAxis_)
{
gd3dDevice->SetVertexDeclaration(VertexPC::Decl);
gd3dDevice->SetStreamSource( 0, axis_Vb_, 0, sizeof(VertexPC) );
gd3dDevice->DrawPrimitive(D3DPT_LINELIST, 0, 3);
}