OpenGl 3D Line Style
Posted: Fri Mar 06, 2020 8:54 am
It should be possible to define lines with a simple pattern using glLineStipple()
Dashed = 255 (0x00FF) ;Dash-dot-dash = 7239 (0x1C47) ;Dotted = 257 (0x0101)
The above example draws the line, but no line style.
Dashed = 255 (0x00FF) ;Dash-dot-dash = 7239 (0x1C47) ;Dotted = 257 (0x0101)
Code: Select all
glLineWidth_(2)
glColor3f_(1.0, 0.2000, 0.2549)
glEnable_(#GL_LINE_STIPPLE)
glLineStipple_(2, 255)
glVertex3d_(5.5, 5.0, 0.0)
glVertex3d_(200.0, 5.0, 0.0)
glDisable_(#GL_LINE_STIPPLE)
glEnd_()