Handbook
Glossary
line-state
GPU-accelerated rendering
»
GPU state
Prev:
point-state
Vocabulary
gpu.state
Class description
The
line-state
controls how lines are rendered.
•
The
width
slot is a
float
value specifying the line width in pixels.
•
The
antialias?
slot is a
boolean
value specifying whether line edges should be smoothed.
See also
<line-state>
,
get-line-state
Definition
USING:
kernel
math
;
IN:
gpu.state
TUPLE:
line-state
{
width
float
read-only
initial:
1.0
}
{
antialias?
boolean
read-only
initial:
f
}
;
Methods
USING:
accessors
combinators
gpu.state
kernel
opengl.gl
;
M:
line-state
set-gpu-state*
{
[
width>>
glLineWidth
]
[
GL_LINE_SMOOTH
swap
antialias?>>
[
glEnable
]
[
glDisable
]
if
]
}
cleave
;