Jump to content
  • Advertisement
Sign in to follow this  
skow

Line smoothing no longer working on modern hardware?

This topic is 4170 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 must admit that I haven’t used GL_LINES in years, but now that I need to use them, I cannot manage to get the lines to anti-alias. I’ve google’d around to make sure I’m not forgetting anything. I do recall reading some glHints aren’t even used any more. Is there a chance that my 6800GT with updated drivers is not allowing lines to blend? I’m testing with the following:
glHint(GL_LINE_SMOOTH_HINT,GL_NICEST);
glEnable(GL_LINE_SMOOTH);
glLineWidth(2.0f);

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

glBegin(GL_LINES);
	…
glEnd();

Share this post


Link to post
Share on other sites
Advertisement
I could be wrong, but I am fairly sure alpha testing is not needed.

Just to be safe I tried adding it, no luck :(

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
Don't forget to enable alpha blending.


It's there : glEnable(GL_BLEND);

Also, alpha testing (as skow saw it) is not necessary, alpha blending is, as Sneftel implied.

Plus, I too have a 6800 GT, and line blending works. However, lose the hints, they're pretty useless nowadays (and thank God for that).

Are you sure there's no difference at all between enabling and disabling line smoothing? Are you perhaps expecting more?

Share this post


Link to post
Share on other sites
Yeah, im sure it's the same with or without the smoothing.

Here is how bad it looks:

Share this post


Link to post
Share on other sites
There's no way for lines which are that thin to look smooth without looking blurry. See the Nyquist-Shannon theorem for why. If you want them to be smoother, make them thicker.

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!