This library works as a binding for all OpenGL commands, so you can have full access to the graphics hardware from Lua.

To have access the GL functions in Lua call require"luagl", or from a C host program you
could call the 'luaopen_luagl' function.
This will create a name space called 'gl', and all the functions and constants
will be inside of it.

To have access the GLU functions in Lua call require"luaglu", or from a C host program you
could call the 'luaopen_luaglu' function.
This will create a name space called 'glu', and all the functions and constants
will be inside of it.

Read the LINSTALL file for instructions on how to install the libraries on
Linux.

Although the luagl and luaglu libraries have
'51' and '52' suffixes they can be removed, by manually renaming the respective
files. The only file that must retain its original name is the
luagl_base library. This is valid for Windows and Linux.
luagl_base is not a Lua module. (Since 1.8)

All OpenGL constants were also converted to strings, for example: instead of writing
gl.QUADS, you can write 'QUADS'. Functions that expected a bitwise operation between mask parameters
can receive a string that contains all the constants strings separated by comma (,). For example:

gl.Begin(gl.TRIANGLES) or gl.Begin("TRIANGLES")
gl.Clear(gl.COLOR_BUFFER_BIT+gl.DEPTH_BUFFER_BIT) or gl.Clear('COLOR_BUFFER_BIT,DEPTH_BUFFER_BIT')

OpenGL constants can be used as numbers using gl.XXX
notation, where XXX is the constant name after "GL_" (for example: gl.QUADS).
This is much faster than using the strings.

The argument specification (e.g., '2d', '3f', '4sv') at the end of most OpenGL functions names have been removed. For example the new gl.Light function binds the OpenGL functions: glLightf, glLightfv, glLighti, glLightiv.

The number of parameters defines the correct function to use. And internally it is used the floating point version of the functions, with the highest possible precision.

Some functions that have a type parameter simply use the most precise possible
(usually GL_DOUBLE or GL_FLOAT) and the format parameter is not used. When stride is
not used, then it is assumed to be 0. But notice that some OpenGL functions uses

Using UserData is more efficient and less memory consuming, especially for
large data. But individual values can NOT be accessed.

Tables are processed internally in the highest precision supported by the
OpenGL function. For instance, Array are usually processed as FLOAT, but
in gl.PolygonStipple and gl.Bitmap they are
processed as BYTE.

The notation "Array2" denotes a table of tables, usually for
2D arrays but can also be used for vertices and other secondary structures. For example: