Handbook
Glossary
draw-line ( seq -- )
Vocabulary
ui
.
gadgets
.
charts
.
lines
Inputs
seq
sequence
of { x y } pairs, in pixels
Outputs
None
Word description
Draw a sequence of straight line segments connecting all consecutive points with a single OpenGL call. Intended to be called by a
draw-gadget*
implementation.
Definition
USING:
kernel
math
opengl
opengl.gl
sequences
ui.gadgets.charts.lines.private
;
IN:
ui.gadgets.charts.lines
:
draw-line
( seq -- )
dup
[
but-last-slice
]
over
length
odd?
[
dip
]
[
call
]
if
rest-slice
append
[
(line-vertices)
gl-vertex-pointer
GL_LINES
0
]
keep
length
glDrawArrays
;