4 OpenGL Vectors
(require sgl/gl-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. Use the sgl/gl-vectors module vectors instead of a Racket cvector directly, because they are specialized to handle the OpenGL types correctly.
procedure
(gl-vector? v) → boolean?
v : any/c
procedure
(gl-vector->vector vec) → vector?
vec : cvector?
procedure
(gl-vector->list vec) → list?
vec : cvector?
procedure
vec : cvector?
procedure
(gl-vector-ref vec pos) → any/v
vec : cvector? pos : exact-nonnegative-integer?
procedure
(gl-vector-set! vec pos v) → void?
vec : cvector? pos : exact-nonnegative-integer? v : any/v
procedure
(gl-byte-vector? v) → boolean?
v : any/c
procedure
(make-gl-byte-vector pos) → gl-byte-vector?
pos : exact-nonnegative-integer?
procedure
(gl-byte-vector v ...) → gl-byte-vector?
v : byte?
procedure
(vector->gl-byte-vector v ...) → gl-byte-vector?
v : (vectorof byte?)
procedure
(list->gl-byte-vector v ...) → gl-byte-vector?
v : (listof byte?)
procedure
(gl-byte-vector+ vec ...+) → gl-byte-vector?
vec : gl-byte-vector?
procedure
(gl-byte-vector- vec ...+) → gl-byte-vector?
vec : gl-byte-vector?
procedure
(gl-byte-vector* x vec) → gl-byte-vector?
x : real? vec : gl-byte-vector?
procedure
(gl-ubyte-vector? v) → boolean?
v : any/c
procedure
(make-gl-ubyte-vector pos) → gl-ubyte-vector?
pos : exact-nonnegative-integer?
procedure
(gl-ubyte-vector v ...) → gl-ubyte-vector?
v : ubyte?
procedure
(vector->gl-ubyte-vector v ...) → gl-ubyte-vector?
v : (vectorof ubyte?)
procedure
(list->gl-ubyte-vector v ...) → gl-ubyte-vector?
v : (listof ubyte?)
procedure
(gl-ubyte-vector+ vec ...+) → gl-ubyte-vector?
vec : gl-ubyte-vector?
procedure
(gl-ubyte-vector- vec ...+) → gl-ubyte-vector?
vec : gl-ubyte-vector?
procedure
(gl-ubyte-vector* x vec) → gl-ubyte-vector?
x : real? vec : gl-ubyte-vector?
procedure
(gl-short-vector? v) → boolean?
v : any/c
procedure
(make-gl-short-vector pos) → gl-short-vector?
pos : exact-nonnegative-integer?
procedure
(gl-short-vector v ...) → gl-short-vector?
v : short?
procedure
(vector->gl-short-vector v ...) → gl-short-vector?
v : (vectorof short?)
procedure
(list->gl-short-vector v ...) → gl-short-vector?
v : (listof short?)
procedure
(gl-short-vector+ vec ...+) → gl-short-vector?
vec : gl-short-vector?
procedure
(gl-short-vector- vec ...+) → gl-short-vector?
vec : gl-short-vector?
procedure
(gl-short-vector* x vec) → gl-short-vector?
x : real? vec : gl-short-vector?
procedure
(gl-ushort-vector? v) → boolean?
v : any/c
procedure
pos : exact-nonnegative-integer?
procedure
(gl-ushort-vector v ...) → gl-ushort-vector?
v : ushort?
procedure
(vector->gl-ushort-vector v ...) → gl-ushort-vector?
v : (vectorof ushort?)
procedure
(list->gl-ushort-vector v ...) → gl-ushort-vector?
v : (listof ushort?)
procedure
(gl-ushort-vector+ vec ...+) → gl-ushort-vector?
vec : gl-ushort-vector?
procedure
(gl-ushort-vector- vec ...+) → gl-ushort-vector?
vec : gl-ushort-vector?
procedure
(gl-ushort-vector* x vec) → gl-ushort-vector?
x : real? vec : gl-ushort-vector?
procedure
(gl-int-vector? v) → boolean?
v : any/c
procedure
(make-gl-int-vector pos) → gl-int-vector?
pos : exact-nonnegative-integer?
procedure
(gl-int-vector v ...) → gl-int-vector?
v : int?
procedure
(vector->gl-int-vector v ...) → gl-int-vector?
v : (vectorof int?)
procedure
(list->gl-int-vector v ...) → gl-int-vector?
v : (listof int?)
procedure
(gl-int-vector+ vec ...+) → gl-int-vector?
vec : gl-int-vector?
procedure
(gl-int-vector- vec ...+) → gl-int-vector?
vec : gl-int-vector?
procedure
(gl-int-vector* x vec) → gl-int-vector?
x : real? vec : gl-int-vector?
procedure
(gl-uint-vector? v) → boolean?
v : any/c
procedure
(make-gl-uint-vector pos) → gl-uint-vector?
pos : exact-nonnegative-integer?
procedure
(gl-uint-vector v ...) → gl-uint-vector?
v : uint?
procedure
(vector->gl-uint-vector v ...) → gl-uint-vector?
v : (vectorof uint?)
procedure
(list->gl-uint-vector v ...) → gl-uint-vector?
v : (listof uint?)
procedure
(gl-uint-vector+ vec ...+) → gl-uint-vector?
vec : gl-uint-vector?
procedure
(gl-uint-vector- vec ...+) → gl-uint-vector?
vec : gl-uint-vector?
procedure
(gl-uint-vector* x vec) → gl-uint-vector?
x : real? vec : gl-uint-vector?
procedure
(gl-float-vector? v) → boolean?
v : any/c
procedure
(make-gl-float-vector pos) → gl-float-vector?
pos : exact-nonnegative-integer?
procedure
(gl-float-vector v ...) → gl-float-vector?
v : float?
procedure
(vector->gl-float-vector v ...) → gl-float-vector?
v : (vectorof float?)
procedure
(list->gl-float-vector v ...) → gl-float-vector?
v : (listof float?)
procedure
(gl-float-vector+ vec ...+) → gl-float-vector?
vec : gl-float-vector?
procedure
(gl-float-vector- vec ...+) → gl-float-vector?
vec : gl-float-vector?
procedure
(gl-float-vector* x vec) → gl-float-vector?
x : real? vec : gl-float-vector?
procedure
(gl-double-vector? v) → boolean?
v : any/c
procedure
pos : exact-nonnegative-integer?
procedure
(gl-double-vector v ...) → gl-double-vector?
v : double?
procedure
(vector->gl-double-vector v ...) → gl-double-vector?
v : (vectorof double?)
procedure
(list->gl-double-vector v ...) → gl-double-vector?
v : (listof double?)
procedure
(gl-double-vector+ vec ...+) → gl-double-vector?
vec : gl-double-vector?
procedure
(gl-double-vector- vec ...+) → gl-double-vector?
vec : gl-double-vector?
procedure
(gl-double-vector* x vec) → gl-double-vector?
x : real? vec : gl-double-vector?
procedure
(gl-boolean-vector? v) → boolean?
v : any/c
procedure
pos : exact-nonnegative-integer?
procedure
(gl-boolean-vector v ...) → gl-boolean-vector?
v : boolean?
procedure
(vector->gl-boolean-vector v ...) → gl-boolean-vector?
v : (vectorof boolean?)
procedure
(list->gl-boolean-vector v ...) → gl-boolean-vector?
v : (listof boolean?)
procedure
(gl-boolean-vector+ vec ...+) → gl-boolean-vector?
vec : gl-boolean-vector?
procedure
(gl-boolean-vector- vec ...+) → gl-boolean-vector?
vec : gl-boolean-vector?
procedure
(gl-boolean-vector* x vec) → gl-boolean-vector?
x : real? vec : gl-boolean-vector?
procedure
(gl-vector-norm vec) → real?
vec : gl-vector?