The openGL library comes with a set of functions that start with aux. These aux functions do the necessary initialization and setup required to create a window that can display openGL graphics. For example, the portable version of the Sierpinski program calls the functions
The aux library functions allow openGL code to be written without reference to the local window system. This makes the openGL application portable. Since these functions do all the window system setup, they free the programmer to concentrate on openGL graphics programming. The portability and ease of use provided by the aux routines also has its cost. An openGL application can be written rapidly, but there is no way to add menus or other graphic user interface features. Integration with Windows allows this program to use menus and the file broswer dialog (called by the Save As menu item).
This program creates a Sierpinski pyramid of the selected power (power 2, by default) and rotates it in the x, y and z dimensions. Although this program does not do that much, it does serve as a model for how openGL code can be closely integrated with Windows. The openGL code is carefully isolated from the Win32 code, which will, I hope, make customizing this code for your application easier.
This program is written in C++ and built with Microsoft Visual C++ 4.0. The framework was built with the Microsoft Applicaton Wizard, a tool that automatically creates the base C++ code, using the Microsoft Foundation Classes, for a Win32 application. This code has been built and tested on Microsoft Windows NT 3.51, running on a Intel 486.
July 28, 1996