==== HOWTO ====

GLN is easy to use, but its API is different from the equivalent functions
from Glut, for example you can just call glutSolidSphere() where you need it,
and this can be done when one uses deprecated features like the immediate-mode.
GLN does not use deprecated features, it is forward-compatible, so the use
scheme is:
  [make-mesh] / [draw-mesh] / [delete-mesh]

Here is below an example to draw a sphere. First in the initialisation stage we
generate a mesh of the sphere with glnMakeSphere() then in the main loop we draw
it with glnDrawMesh(), and when we're off we clean (free) with glnDeleteMesh():

    gln_mesh *my_sphere_mesh;
    my_sphere_mesh =
        glnMakeSphere(
            2.0, /* radius */
            32,  /* slices */
            16,  /* stacks */
            GLN_GEN_NORMALS  /* generates faces normals,   */
        );                   /* needed if we want lighting */

    gln_matrices matrices;
    setMyProjectionMatrix( matrices.projection, /* params */ );

    gln_drawMeshParams dm_params;
    /* set the light direction */
    dm_params.light_dir[0] =  0.0;  /* x */
    dm_params.light_dir[1] = -1.0;  /* y */
    dm_params.light_dir[2] =  0.0;  /* z */

    while (run_main_loop)
    {
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        setMyModelViewMatrix( matrices.modelview, /* params */ );
        glnDrawMesh(
            my_sphere_mesh,
            &matrices,
            &dm_params);
        someSwapBuffers();
    }

    glnDeleteMesh(my_sphere_mesh);  /* when we don't need it anymore */


================================

==== Meshes ====

It is also possible to draw various shapes:


float vertices[] = {
    /* RGB colors */   /* XYZ coords */
    0.0, 1.0, 0.0,    -1.0,  1.0, -1.0,
    0.0, 0.0, 0.0,    -1.0, -1.0, -1.0,
    1.0, 1.0, 0.0,    -1.0,  1.0,  1.0,
    1.0, 0.0, 0.0,    -1.0, -1.0,  1.0,
    1.0, 1.0, 1.0,     1.0,  1.0,  1.0,
    1.0, 0.0, 1.0,     1.0, -1.0,  1.0,
    0.0, 1.0, 1.0,     1.0,  1.0, -1.0,
    0.0, 0.0, 1.0,     1.0, -1.0, -1.0,
};
unsigned int indices[] = {
    /* a cube, each face is made of 2 triangles */
    0,1,3,  3,2,0,
    4,5,7,  7,6,4,
    3,1,7,  7,5,3,
    0,2,4,  4,6,0,
    6,7,1,  1,0,6,
    2,3,5,  5,4,2,
};

    /* initialisation */

    gln_meshSrc src;
    src.vertices_kind = GLN_RGB_VERTICES3;
    src.vertices = vertices;
    src.indices = indices;
    src.vertices_size = 48;
    src.indices_size = 36;

    gln_mesh *my_mesh = glnMakeMesh(&src);

    /* enter main drawing loop */

    glnDrawMesh( my_mesh, /* parameters */ );

    /* exit main drawing loop */

    glnDeleteMesh( my_mesh );

