glunits.txt 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. glunits.zip
  2. ***************
  3. These are the Delphi conversions of gl.h, glu.h, glut.h and
  4. glext.h. Copy them to your Delphi\Lib directory or somewhere else
  5. in your compiler's search path and you're all set!
  6. To use these units with OpenGL drivers other than Microsoft's,
  7. you need to manually initialize three DLL libraries. For example:
  8. LoadOpenGL('opengl.dll');
  9. LoadGLu('glu.dll');
  10. LoadGlut('glut.dll'); // Optional
  11. If you do this, make sure to free the previously loaded library
  12. first:
  13. FreeOpenGL;
  14. FreeGLu;
  15. FreeGlut;
  16. If the DLLs the application is trying to load cannot be found, an
  17. exception will be raised. By default, the units will try to load
  18. OpenGL32.dll, GLu32.dll and Glut32.dll. No exception will be
  19. thrown if they are not found, so if you want to support multiple
  20. OpenGL implementations in your app, it's probably best to
  21. explicitly load the DLLs explicitly as shown above. This way, you
  22. can properly trap errors.
  23. A final note: if you have a 3D card with an OpenGL ICD, you do NOT
  24. need to load the driver yourself. Microsoft's OpenGL32.dll will
  25. automatically detect and use your 3D card's drivers, so the
  26. default settings in these units will work perfectly.
  27. The fourth file in this archive, glext.pas, contains declarations
  28. of constants and function prototypes of most OpenGL extensions.
  29. To use an extension, you just need to check if it's supported, and
  30. load it's functions with wglGetProcAddress() if it is. You can
  31. check the presence of an extension with the included function
  32. glext_ExtensionSupported(). By using glext.pas, you no longer have
  33. to copy/paste/translate declarations from the extension specs. If
  34. you should come across an extension that isn't yet included in
  35. glext.pas, I'd appreciate it if you could drop me a line so I can
  36. add it ASAP.
  37. Tom Nuydens ([email protected])