|
Dot contains Delphi translations of the OpenGL header file and a few related APIs. The main file is GL.pas, which contains function prototypes for OpenGL 1.1. Also included is GLu.pas, a header for the OpenGL Utility library. Glut.pas is a header for Mark Kilgard's Glut library. Finally, GLext.pas is an extension loading library. The use of these units is obvious. The only thing you may want to know is that GL.pas, GLu.pas and Glut.pas can load their corresponding DLLs dynamically. The following functions are available to this purpose: procedure LoadOpenGL(const dll: String); procedure LoadGLu(const dll: String); procedure LoadGlut(const dll: String); The OpenGL units all load the default DLLs from their initialization section, so you only need to call these functions if you need to load different DLLs. It shouldn't normally be necessary to do this, as most applications will want to use OpenGL through the standard ICD mechanism. It may be convenient to place a LoadGlut('glut32.dll') call in your application startup code, though, as this will raise an exception if the Glut DLL isn't found on the end-user's system, allowing you to handle the error gracefully. The use of GLext.pas is also very straightforward. Only a single function is required to load an extension: function glext_LoadExtension(ext: String): Boolean; Pass the name of the extension you want to load to this function (e.g. 'GL_ARB_multitexture'), and the function will check if the extension is supported, and load all the extension's functions if it is. The function returns TRUE if all that succeeds or FALSE otherwise. |
|||
|
The Delphi OpenGL Toolkit was written
by Tom Nuydens.
See main page for disclaimer. For updates, visit
Delphi3D.