home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vos2-121.zip / v / include2 / GL / readme < prev   
Text File  |  1998-11-04  |  3KB  |  60 lines

  1. Some notes on the OPENGL for OS/2 implementation from IBM
  2. =========================================================
  3.  
  4. The first thing to know is that Warp ships with OPENGL v1.0,
  5. but there is a freely available update to OPENGL 1.1 from
  6. IBM. 
  7.  
  8. For many applications, the v1.0 DLL's run a lot faster than
  9. the v1.1 ones, but some applications may require the advanced features 
  10. that v1.1 offers. Another thing to keep in mind is that a program 
  11. compiled with the v1.0 libraries will not run under the v1.1 DLL's, 
  12. but an application compiled with the v1.1 libraries will run under both. 
  13.  
  14. Since apps compiled with version 1.1 are backwards compatible, I will 
  15. supply the needed v1.1 OPENGL files with V.
  16.  
  17. For programmers, OPENGL "include" headers are needed.  These are not
  18. included with the warp OPENGL install, so they are included in the
  19. include2\GL directory.  Also, you will need to link with the opengl.lib 
  20. file, so I include that as well in the lib\os2 directory.
  21.  
  22. The latest headers and other OpenGL stuff can be found at 
  23. ftp://ftp.austin.ibm.com/pub/developer/os2/OpenGL
  24.  
  25.  ogl9635.zip - appears to be the latest v1.0 stuff
  26.  oglgold.zip - appears to be the latest v1.1 stuff
  27.  
  28. Notes specific to OPENGL for OS/2
  29. =================================
  30.  
  31. 1) Borland has a problem with the way gl.h attempts to set the APIENTRY
  32. variable based upon what compiler is used.  In principle the header
  33. should detect Borland's compiler (__BORLANDC__) and set APIENTRY to
  34. __syscall.  In practise it sets it to blank and you can't link anything.
  35. The problem seems to be that gl.h looks for the OS2 variable to be set,
  36. and Borland doesn't do this by default, so it then ignores the rest of 
  37. the code that sets the APIENTRY stuff.  
  38.  
  39. I #define OS2 in the source code before calling gl.h, then the header 
  40. file works fine. Note that all the samples included with the IBM 
  41. package do not do this, so Borland users will need to add this fix 
  42. to all the IBM sample code.
  43.  
  44. 2) The way the include files include other files is a complete 
  45. debacle. 
  46.  
  47. gl.h    includes no others
  48. glu.h   includes  GL/gl.h
  49. glut.h  includes  gl.h glu.h
  50. pgl.h   includes  gl.h
  51. tk.h    includes  GL/gl.h GL/pgl.h GL/glu.h
  52. aux.h   includes  pgl.h gl.h glu.h
  53.  
  54. You see that some add the GL/ subdirectory and others don't, so in 
  55. general you need to have your INCLUDE path define both paths with and 
  56. without the GL/ subdirectory.  Could this be more ill conceived...
  57. I don't think so!!  Anyway, I modified pgl.h to use GL/gl.h so that 
  58. at least for V everything is using the GL/ subdirectory.
  59.  
  60.