how to enable GL_LINE_SMOOTH
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
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);
glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); glHint(GL_LINE_SMOOTH_HINT,GL_NICEST);
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.
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 sitwindGL_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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement