Version: 4.0.2
4 OpenGL Vectors
The sgl/gl-vectors module supports OpenGL programming
with cvectors. In this document and in the error messages, a
“gl-vector” is just a cvector, while a
“gl-〈type〉-vector” is a cvector with an appropriate
type. Using the sgl/gl-vectors module instead of using
cvector directly because these functions are specialized to
handling the OpenGL types correctly.
Synonyms for cvector?, cvector->vector, cvector-length, etc.
Operations on vectors of byte elements. The gl-byte-vector+
and gl-byte-vector- functions compute the element-by-element sum and
difference of the given vectors, respectively. The gl-byte-vector* function
multiplies each element of vec by x.
Operations on vectors of ubyte elements. The gl-ubyte-vector+
and gl-ubyte-vector- functions compute the element-by-element sum and
difference of the given vectors, respectively. The gl-ubyte-vector* function
multiplies each element of vec by x.
Operations on vectors of short elements. The gl-short-vector+
and gl-short-vector- functions compute the element-by-element sum and
difference of the given vectors, respectively. The gl-short-vector* function
multiplies each element of vec by x.
Operations on vectors of ushort elements. The gl-ushort-vector+
and gl-ushort-vector- functions compute the element-by-element sum and
difference of the given vectors, respectively. The gl-ushort-vector* function
multiplies each element of vec by x.
Operations on vectors of int elements. The gl-int-vector+
and gl-int-vector- functions compute the element-by-element sum and
difference of the given vectors, respectively. The gl-int-vector* function
multiplies each element of vec by x.
Operations on vectors of uint elements. The gl-uint-vector+
and gl-uint-vector- functions compute the element-by-element sum and
difference of the given vectors, respectively. The gl-uint-vector* function
multiplies each element of vec by x.
Operations on vectors of float elements. The gl-float-vector+
and gl-float-vector- functions compute the element-by-element sum and
difference of the given vectors, respectively. The gl-float-vector* function
multiplies each element of vec by x.
Operations on vectors of double elements. The gl-double-vector+
and gl-double-vector- functions compute the element-by-element sum and
difference of the given vectors, respectively. The gl-double-vector* function
multiplies each element of vec by x.
Operations on vectors of boolean elements. The gl-boolean-vector+
and gl-boolean-vector- functions compute the element-by-element sum and
difference of the given vectors, respectively. The gl-boolean-vector* function
multiplies each element of vec by x.
Returns the square root of the sum of the squares of the elements
of vec.