On this page:
gl-vector?
gl-vector->type
gl-vector->cpointer
gl-vector->length
gl-vector->type/ cpointer
gl-vector->type/ cpointer/ length

13 Utility functions for homogenous vectors

These functions are not part of the OpenGL API but are provided to make working with glVertexPointer and similar procedures easier.

(gl-vector? v)  boolean?
  v : any/c
Returns #t if v belongs to one of the homogenous vector types which can be used with OpenGL, #f otherwise. These vector types are: u8vector, s8vector, u16vector, s16vector, u32vector, s32vector, f32vector and f64vector.

(gl-vector->type v)  exact-integer?
  v : gl-vector?
Determine the OpenGL type of v. This returns a numerical value such as GL_SHORT, GL_FLOAT, etc., which can be passed into glVertexPointer and similar procedures.

(gl-vector->cpointer v)  cpointer?
  v : gl-vector?
Get a C pointer to v.

(gl-vector->length v)  exact-nonnegative-integer?
  v : gl-vector?
Get the length of v.

(gl-vector->type/cpointer v)  
exact-integer? cpointer?
  v : gl-vector?
Get the OpenGL type and C pointer of v. This is slightly more efficient than getting them each individually.

(gl-vector->type/cpointer/length v)
  
exact-integer?
cpointer?
exact-nonnegative-integer?
  v : gl-vector?
Get the OpenGL type, C pointer and length of v. This is slightly more efficient than getting them each individually.