opengl - Why is GL_LINES blurry? -
consider following code:
glcolor4ub(255, 255, 255,255); glbegin(gl_quads); glvertex2i(100, 100); glvertex2i(300, 100); glvertex2i(300, 101); glvertex2i(100, 101); glend(); gllinewidth(1); glbegin(gl_lines); glvertex2i(100,200); glvertex2i(300,200); glend();
that results in following, don't understand:
i have not enabled (and have gone far disable) gl_line_smooth , gl_smooth. if global anti-aliasing "feature," shouldn't affect gl_quads well?
halp?
it because passed coordinate halfway between 2 pixels.
for quads, borders between pixels , give nice clean edges.
for lines, vertices between pixels causes half line fall on each. example, if using gllinewidth(2)
, work (half line 1 pixel, there's 1 pixel either side). gllinewidth(1)
, you're getting half pixel either side.
Comments
Post a Comment