Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Applying color to lines??

This topic is 5658 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!