Graphics Programming
with VOGLE
7
The basic Input/Output system (BIOS) installed on the motherboard by the
manufacturer and the kernel of the operating system (OS) installed on the
hard drive are able to display characters on the screen, but are unable to draw
pictures. Additional graphics libraries are needed to generate icons and menus,
display windows, and launch graphics applications. These graphics libraries are
built on a succession of layers.
On Unix systems, the X11 server provides graphics functionality at the
lowest possible level. Higher-level libraries provide application programming
interfaces (API) in the form of C or C++ code that can be compiled and linked
statically or dynamically with user-defined functions. For example, an API
may encapsulate functions to generate a window on the desktop, or monitor
the mouse and keyboard.
The Very Ordinary Graphics Learning Environment implemented in the
Voglelibrary for the X11 server is ideally suited for learning the fundamentals
of graphics programming and developing small or private applications.
TheVoglelibrary is written in C and includesFortran 77andPascal
interfaces.^1 Drivers are available for a variety of devices to generate graphs and
images suitable for display and printing in black and white or color format.
The source code, the compiled binary file for several Unix systems inc-
luding thecygwinenvironment running inside Windows, and the necessary
header files, can be downloaded from this book’s Internet site. An informative
reference manual can be found athttp://dehesa.freeshel.org/vogle.A
summary of theVoglefunctions is given in Appendix B.
To runVogleon Windows, we launch the cygwin environment by click-
ing on the cygwin shell icon, and then issue the command:
startx
(^1) Implementation in C++ is possible thanks to a header file written by Tim Love of
Cambridge, U.K.