Jump to content
  • Advertisement
Sign in to follow this  
Tera_Dragon

line thickness

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

Advertisement
Hi,

Yes, just use...

//make line width 2.0 for example. I'm pretty sure the default is 1.0;
glLineWidth(2.0f);

Note: From the Spec
<quote>
Not all widths can be supported when line antialiasing is enabled. If an unsupported width is requested, the nearest supported width is used. Only width 1.0 is guaranteed to be supported; others depend on the implementation. The range of supported widths and the size difference between supported widths within the range can be queried by calling glGet with arguments GL_LINE_WIDTH_RANGE and GL_LINE_WIDTH_GRANULARITY.
</quote>

Hope that gets you going...

J



Share this post


Link to post
Share on other sites
This has nothing to do with the width of the line, but is to do with the antialiasing. When I set it with the following line (taken from nehe):
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
Nothin is different about the line. I rememberwhat Jehsup had just posted, and so set the line to width one again, but still the line looks bad (no difference) when it is diagonal. I am setting itcorrectly, or is there a better way of doing it?
Tera_Dragon

Share this post


Link to post
Share on other sites
You'll probably need to enable alpha blending as well

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

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!