Jump to content
  • Advertisement
Sign in to follow this  
nuclear123

Coloring a line

This topic is 2518 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 know you can specify the vertices color but what about when i draw a line and connect the vertices? how do i specify the color it should use?

Share this post


Link to post
Share on other sites
Advertisement
Hi!
In the simplest case the color of a line is interpolated between the vertex colors. If you draw a line from a red to a blue vertex the line starts red (1,0,0), halfway it is something purple (0.5, 0, 0.5) and finally it gets blue (0,0,1) at the second vertex.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!