Read Me
This is Gauche-gl, OpenGL binding for Gauche.
See INSTALL (English) or INSTALL.eucjp (Japanese) for installation
instructions.
No document is written yet. There're several examples ported from
``OpenGL Programming Guide'' under examples/glbook.
The mapping from Scheme to C call is mostly straightforward.
SRFI-4 uniform vectors are extensively used to represent
arrays of numbers; e.g. when you can pass GLfloat array to
C call, you can pass f32vector in Scheme.
Scheme API is polymorphic. It can figure out what type of
arguments you pass to it. The variations functions for
argument types in C calls (e.g. glVertexi, glVertexfv, etc)
are all mapped to a single gl-vertex function.
(gl-vertex 1.0 2.0 3.0) => glVertex3d
(gl-vertex '#f32(1.0 2.0)) => glVertex2fv
(gl-vertex '#s32(3 2 5)) => glVertex3iv
Generally passing uniform vectors is more efficient, for
it doesn't need to check type of every values in it.
Among variations of uniform vectors, f32vector is usually
the most efficient.