PDA

View Full Version : Drawing beautiful lines



potatosoftware
07-06-2011, 04:46 AM
I have curved lines drawn by using the GL_LINE_STRIP and passing the vertexes.

any examples how to make effects on such lines so that they have a better look ?

What about Pixel shaders, can they help ?

A.Conz
07-06-2011, 07:10 AM
something like multisampling?

MaxH
07-06-2011, 12:14 PM
Use line anti-aliasing. The code below sets it up for you.



glEnable (GL_BLEND);
glEnable (GL_LINE_SMOOTH);
glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);