• Advertisement
Sign in to follow this  

how to enable GL_LINE_SMOOTH

This topic is 4216 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 have drawn a few QUADS with texture and would like to enable the LINE_SMOOTH. I added the following 2 lines to my code: Gl.glEnable (Gl.GL_LINE_SMOOTH); Gl.glHint (Gl.GL_LINE_SMOOTH_HINT, Gl.GL_NICEST); is this sufficient to enable the anti aliasing? because nothing is happening. any tips what i am doing wrong? thanx

Share this post


Link to post
Share on other sites
Advertisement
Hello,at your Initialization function add the following lines.


glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);

glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); glHint(GL_LINE_SMOOTH_HINT,GL_NICEST);

Share this post


Link to post
Share on other sites
Did you forget to disable texturing before drawing the lines? And what's the behaviour you get? "Nothing is happening" could mean a lot of things, like are the lines showing up at all, or are they just not anti-aliased?

Share this post


Link to post
Share on other sites
they are not antialiased.

i enabled the antialiasing code as
suggested above. then started to
do some drawing.

some not textured triangels and
some textured Quads, none of them
seemed to be antialiased.

Share this post


Link to post
Share on other sites
Quote:
Original post by sitwind
they are not antialiased.

i enabled the antialiasing code as
suggested above. then started to
do some drawing.

some not textured triangels and
some textured Quads, none of them
seemed to be antialiased.
GL_LINE_SMOOTH is meant for antialiasing lines... GL_POLYGON_SMOOTH is for polygons. Depending on what you're doing, you're probably better off with multisampling if it's available.

Share this post


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

  • Advertisement