home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mesa5.zip / mesa5src.zip / Doc / programming.txt < prev    next >
Text File  |  2002-12-21  |  4KB  |  124 lines

  1. /* WarpMesaGL samples readme.txt */
  2.  
  3. How to build WarpMesaGL samples ?
  4. --------------------------------------------------------
  5. 1. unzip examples
  6. 2. ren \TOOLKIT\H\gl \TOOLKIT\H\gl_old
  7. 3. run \Samples\makeAll.cmd
  8. 4. in case of problems look run single \Samples\makeOne.cmd SampleDirName
  9.  
  10. How to convert any OpenGL samples to WarpMesaGL samples ?
  11. --------------------------------------------
  12. Example: source file -  MesaCVS\samples\line.c
  13.  
  14. build Warp OpenGL sample:
  15. (a)  copy line.c and tkmap.c to selected directory,
  16.      copy MAIN.C and basis.h from \Samples\OGL_SAMPLES
  17. to the same directory:
  18.  
  19. Directory of G:\MESA\OS2_port\Samples\LINE
  20.  
  21. 27.02.00  14:12      <DIR>             0  .
  22. 27.02.00  14:12      <DIR>             0  ..
  23. 13.02.00   2:33        391             0  basis.h
  24. 19.08.99   3:55       4266             0  line.c
  25. 13.02.00   2:32       1473             0  MAIN.C
  26. 19.08.99   3:55       1212             0  tkmap.c
  27. 27.02.00  16:43         77             0  makeitOGL.cmd
  28. 27.02.00  16:13         30             0  runit32.cmd
  29.  
  30. (b)
  31.   change in line.c name of main to mainint:
  32.  
  33. //int main(int argc, char **argv)
  34. int maininit(int argc, char** argv)
  35. (b1)
  36. change includes
  37. #include <GL/gl.h>
  38. #include <GL/glu.h>
  39. to
  40. #include "basis.h"
  41.  
  42. (b2) delete, if there is
  43. #include "aux.h"
  44. and change all aux* functions to its glut analogs
  45.  
  46. (c1)  to compile with from command line (makeitOGL.cmd): 
  47. icc -Ss -Ms line.c MAIN.C   -B" /st:1000000 /nop OPENGL.lib GLUT.lib" 
  48.  
  49. (c2) 
  50.   to compile from VAC++ 3 WorkFrame rename tkmap.c to tkmap.h. and change
  51. in line.c  #include "tkmap.c" to  #include "tkmap.c"
  52. Deselect "Use Optlink linkage" in compiler options, set stack size to 
  53. 1000000 and add OPENGL.lib GLUT.lib libraries
  54.  
  55. (c3) To run line.exe at some videodrivers & videmodes with 32bits per pixel
  56. make runit32.cmd:
  57.  
  58. SET OGL_BIT_COUNT=32
  59. line.exe
  60. =====================================
  61.  
  62. build WarpMesaGL sample:
  63. (a1) copy line.c and tkmap.c to selected directory,
  64. (a2) copy MAIN.C,basis.h,GL_TEST.H,GL_TEST.RC,MesaGL.ico from \Samples 
  65.      (not from \Samples\OGL_SAMPLES !) to the same directory;
  66. (a3) copy MesaGL2.LIB and MesaGLUT.LIB to the same directory, or somewhere
  67.      at LIB  enviroment path 
  68. (a4) copy MESA\OS2_port\GL directory to MESA\OS2_port\Samples\LINE or
  69.      adjust path to GL in basis.h
  70. (a5) copy MesaGL2.DLL, MesaGLUT.dll to the same directory if you 
  71.      have "." in your LIBPATH, or copy somewhere at LIBPATH
  72.   
  73. You will have something like that:
  74.  
  75. Directory of G:\EVGEN\MESA\OS2_port\Samples\LINE
  76.  
  77. 19.01.00  11:57      <DIR>             0  gl
  78. 27.02.00  16:51       4302             0  line.c
  79. 27.02.00  17:00       1407             0  MAIN.C
  80. 19.08.99   3:55       1212             0  tkmap.c
  81. 27.02.00  16:22        385             0  basis.h
  82. 23.01.00  17:41       6375             0  GL_TEST.H
  83. 23.01.00  17:42       1011           176  GL_TEST.RC
  84. 16.02.99  14:24       3428             0  MesaGL.ico
  85. 28.02.00  10:56      34816             0  MesaGL2.LIB
  86. 28.02.00  10:58       3584             0  MesaGLUT.LIB
  87. 28.02.00  10:56    1023606            61  MesaGL2.DLL
  88. 28.02.00  10:58      62464            61  MesaGLUT.dll
  89. 17.06.97   1:18      63564             0  DIVE.DLL
  90. 27.02.00  16:13         30             0  runit.cmd
  91. 27.02.00  16:43         77             0  makeit.cmd
  92. 27.02.00  16:43         99             0  makeitMesa.cmd
  93.  
  94.  
  95.  
  96. (b)  change in line.c name of main to mainint:
  97.  
  98. //int main(int argc, char **argv)
  99. int maininit(int argc, char** argv)
  100.  
  101. (b1)
  102. change includes
  103. #include <GL/gl.h>
  104. #include <GL/glu.h>
  105. to
  106. #include "basis.h"
  107.  
  108. (b2) delete, if there is
  109. #include "aux.h"
  110. and change all aux* functions to its glut analogs
  111.  
  112. (c1)  to compile with from command line  (makeitMesa.cmd): 
  113.  
  114. icc -Ss line.c MAIN.C   -B" /st:1000000 /nop MesaGL2.LIB MesaGLUT.LIB"
  115. rc GL_TEST.RC  line.exe
  116.  
  117.  
  118. (c2) 
  119.   to compile from VAC++ 3 WorkFrame rename tkmap.c to tkmap.h. and change
  120. in line.c  #include "tkmap.c" to  #include "tkmap.c"
  121. Set stack size to 200000, application type as "Window" and 
  122. add MesaGL2.LIB MesaGLUT.LIB libraries
  123.  
  124.