Jump to content
  • Advertisement
Sign in to follow this  
phyxle

glLineWidth and scaling

This topic is 3055 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 noticed that once the line width is set using glLineWidth, it does not change even if the model is scaled. That becomes noticeable when the objects is scaled to be small but the line width is a great number. I know I can manually change the width every time I scale but I was wondering if there is a better way to do it. Moreover, I am using a display list and I change the scale after creation of the display list and during rendering. Therefore, I am not able to change the line width at run time. Let me know if there is way to do this. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Line as far as i know is drawn in a different way than triangles. Line just connects two points in screen-space. It's like a brush on canvas. If you need the lines to have actual scalable width you'll need to draw a strip of quads. Lists are deprecated, by the way.

Share this post


Link to post
Share on other sites
Vertex positions are transformed by matrices, line width has nothing to do, if you need to add more width to the line, you can try overdrawing the lines with a small offset, the number lines may depend on your needs.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!