Examples from the
Compiled by Paul Bourke |
Source code and documentation
|
The following are some examples demonstration C code using the "excellent" GLF library written by Roman Podobedov. The main benefit of the library is it's ease of use, only a half a dozen functions are needed for the vast majority of applications. The comments here relate to version 1.0 released around August 2000.
The library supports 4 basic geometry types, 2D wireframe or filled, and 3D wireframe or filled. These are illustrated below, the program that created these examples is given in the source section at the bottom of this page.

At the time of writing the library comes with 11 fonts. If there is a slight problem with the library is that the font directory path needs to be explicitly specified, it is relatively easy to modify the code (the UNIX version at least) so that the font library is set as a global variable and getenv() used within the code. This is particularly important for sites where multiple developers will be using the library. These are illustrated below.

============================================================================== | GLF Library | Version 1.0 (Release) | | Author: Roman Podobedov | Email: romka@ut.ee | WEB: www.ut.ee/~romka | Date: 17 August 2000 | | Copyright (C) 2000, Romka Graphics | This library is freely distributable without any license or permissions. | You can use this library in any program (commercial, educational | or individual), but in each program, where You use this library, You | should to keep this header (author name and coordinates)! ==============================================================================