c++ - Sub pixel drawing with opengl -
i drawing lots of small black rectangles white screen , move , zoom doesn't graceful.
how can draw them if edge lies between pixels, pixels grey rather black?
what asking anti-aliasing,and there numerous ways of doing it. 1 way summarized in gamedev topic: http://www.gamedev.net/topic/107637-glenablegl_polygon_smooth/.
glenable(gl_blend); glblendfunc(gl_src_alpha, gl_one_minus_src_alpha); glhint(gl_point_smooth, gl_nicest); glhint(gl_line_smooth, gl_nicest); glhint(gl_polygon_smooth, gl_nicest); glenable(gl_point_smooth); glenable(gl_line_smooth); glenable(gl_polygon_smooth);
Comments
Post a Comment