For example, the OpenGL API defines an enumeration with symbolic
constants whose C names are GL_POINTS, GL_LINES, GL_TRIANGLES, and so
-on. Collectively they form the BeginMode enumeration type. To access
+on. Collectively they form the PrimitiveType enumeration. To access
these constants in Figl, apply the constant name to the enumeration
-type: @code{(begin-mode triangles)}.
+type: @code{(primitive-type triangles)}.
Bitfields are similar, though the constructor accepts multiple symbols
and produces an appropriate mask. In the GLUT API there is the
@subsubsection Begin/End Paradigm
-@defmac gl-begin begin-mode body ...
-Begin immediate-mode drawing with @var{begin-mode}, evaluate
+@defmac gl-begin primitive-type body ...
+Begin immediate-mode drawing with @var{primitive-type}, evaluate
the sequence of @var{body} expressions, and then end drawing (as with
@code{glBegin} and @code{glEnd}).
*vertices*
#:stride (packed-struct-size color-vertex)
#:offset (packed-struct-offset color-vertex r))
- (gl-draw-arrays (begin-mode quads) 0
+ (gl-draw-arrays (primitive-type quads) 0
(packed-array-length *vertices* color-vertex))
(gl-disable-client-state (enable-cap color-array))
(gl-disable-client-state (enable-cap vertex-array)))
(define (draw-axis scale)
;; Could disable lighting and depth test.
- (gl-begin (begin-mode lines)
+ (gl-begin (primitive-type lines)
(gl-color 1 0 0)
(gl-vertex 0 0 0)
(gl-vertex scale 0 0)
(define *particles* (make-packed-array position 0))
(define (draw-particles)
- (gl-begin (begin-mode quads)
+ (gl-begin (primitive-type quads)
(unpack-each/serial *zquads* zquad
(lambda (n r g b x- y- x+ y+ z)
(gl-color r g b)
(define (draw-axis scale)
;; Could disable lighting and depth test.
- (gl-begin (begin-mode lines)
+ (gl-begin (primitive-type lines)
(gl-color 1 0 0)
(gl-vertex 0 0 0)
(gl-vertex scale 0 0)
#f
#:stride (packed-struct-size color-vertex)
#:offset (packed-struct-offset color-vertex r))
- (gl-draw-arrays (begin-mode quads) 0
+ (gl-draw-arrays (primitive-type quads) 0
(packed-array-length *vertices* color-vertex))
(gl-disable-client-state (enable-cap color-array))
(gl-disable-client-state (enable-cap vertex-array))
(define (draw-axis scale)
;; Could disable lighting and depth test.
- (gl-begin (begin-mode lines)
+ (gl-begin (primitive-type lines)
(gl-color 1 0 0)
(gl-vertex 0 0 0)
(gl-vertex scale 0 0)