Jump to content
  • Advertisement
Sign in to follow this  
intel4004

OpenGL Pixel thickness of lines in OpenGL

This topic is 4549 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

Hi, I am fairly new with OpenGL. I was wondering how thick lines are drawn in OpenGL. There are two cases as far as I see it: lines with odd thickness values and lines with even thickness values. 1) How are odd-thick lines drawn? If linewidth is 3.0 for instance? Whill the line be drawn directly were you draw it, with 1 pixel to each side of the line? 2) How are even-thick lines drawn? This is more tricky to me as there is no discrete center? How are lines (and points drawn) in this case? Regards Intel4004

Share this post


Link to post
Share on other sites
Advertisement
glLineWidth is the function you're looking for.
As far as your other questions go I would assume the answer to #1 is yes, but I'm not sure as to the answer to #2 though. You could always generate an even thickness line and continue it with a 1 thickness line drawn at the center of the even thickness line and see how they line up.

Hope this helps.

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.

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!