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.
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
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.
Returns the square root of the sum of the squares of the elements
of vec.