Applying color to lines??
I am drawing a box using line strips but my lines are always black, how can I apply color to the lines. I have tried setting a material but that doesn’t work, I have also tried setting the color of the vertices, but that doesn’t work as well?? Any ideas how I can set color to my lines.
Here is my render code, where i try to set the material
D3DMATERIAL8 mtrl;
D3DUtil_InitMaterial(mtrl, 1.0f, 1.0f, 0.0f);
m_pd3dDevice->SetMaterial(&mtrl);
m_pd3dDevice->SetStreamSource(0, m_pBoundVolume.pVB, sizeof(CUSTOMVERTEX));
m_pd3dDevice->SetVertexShader(D3DFVF_XYZ);
m_pd3dDevice->SetIndices(m_pBoundVolume.pIB, 0 );
m_pd3dDevice->DrawIndexedPrimitive(D3DPT_LINELIST, 0,
8, // number of vertices
0,
12); // number of primitives
[edited by - vlade0000 on March 24, 2003 10:16:48 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement