delphi - OpenGL: Increasing the number of the lines changes the antialiasing? -


i writing paint program in delphi. user clicks 2 points on screen , line drawn between them. want lines anti-aliased. put code in create() procedure of opengl class (which called 1 time in start):

 glenable(gl_line_smooth);  glenable(gl_blend);  glblendfunc(gl_src_alpha, gl_one_minus_src_alpha);  glhint(gl_line_smooth_hint, gl_nicest); 

when start drawing, first, second , maybe third lines drawn fine. interestingly enough, when number of lines increases (say 7, 8 lines), anti-aliasing starts fail! adding each line on screen, gets worse , lines edges starts become sawtooth!!

i put same code on top of draw() procedure draws lines (and runs each click of mouse), nothing changes.

am doing wrong here? has suggestion?

are sure you're not drawing line segment more once? call glclear before doing drawing?


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -