Drawing a "3D-looking" line in OpenGL -
when draw line in opengl, gllinewidth creates fixed-size line, regardless how close line you.
i wanted draw line appear bigger when it's close. now, understand if use rectangle achieve effect, bit pixelated once polygon far enough.
what i've done draw normal gl_line point line bigger pixel size, , continue rectangle point. however, it's not fast chucking down vertex array or vbo, had recalculated every frame.
what other methods available? or stuck this?
i use gradated texture draw lines:
this alpha of texture. have opaque center fading transparent @ edges. can draw line using rectangle points:
(x1,y1,0,0), (x2,y1,1,0), (x1,y2,0,1), (x2,y2,1,1)
where last 2 entries in each tuple u , v of texture. ends looking smooth. can string lots of small rectangles make curvy lines.
Comments
Post a Comment