The sgl/gl module provides a direct interface to the system’s GL library closely following the conventions of the C-language OpenGL API. It provides a binding for each #defined constant (these start with GL_) and for the functions in the GL 1.5 and GLU 1.3 specifications, except for the following:
Vertex arrays (GL 1.5, Section 2.8)
Buffer objects (GL 1.5, Section 2.9)
glGetPointerv (GL 1.5, Section 6.1.11)
Buffer object queries (GL 1.5, Section 6.1.13)
Polygon tessellation (GLU 1.3, Section 5)
gluQuadricCallback (GLU 1.3, Section 6.2)
NURBS (GLU 1.3, Section 7)
If one of the provided functions is not present on your system (e.g. if your system supports only GL 1.3), then the corresponding sgl/gl function raises a run-time exception when invoked.
The functions provided by sgl/gl perform comparable checking to their C-language counterparts; they check the types of their arguments, but do not check the length of array arguments. The following details the kinds of Racket values that can be provided for each primitive OpenGL type:
OpenGL functions that take vector arguments accept cvector values. The type of the cvector is checked; for example, glVertex3fv expects a vector of GLfloats, so glVertex3fv accepts only a cvector containing reals. See also sgl/gl-vectors. Functions that accept arrays of type void* accept any cvector; you must ensure that you supply the proper kind of vector, as in the C-language OpenGL API.