how to enable GL_LINE_SMOOTH

Started by
4 comments, last by Kalidor 17 years, 6 months ago
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
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);

hmmm, does not seem to work
i am using the tao opengl implementation.

funny.
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?
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.
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.

This topic is closed to new replies.

Advertisement