aux2glut.sed
上传用户:xk288cn
上传日期:2007-05-28
资源大小:4876k
文件大小:2k
源码类别:

GIS编程

开发平台:

Visual C++

  1. #
  2. # aux2glut.sed - a sed script for converting AUX code to GLUT
  3. #
  4. # You will still need to do some work, but this is a good start.
  5. #
  6. 1i
  7. /* aux2glut conversion Copyright (c) Mark J. Kilgard, 1994, 1995 */
  8. 1i
  9. s/int main/void main/g
  10. s/auxInitWindow/glutCreateWindow/g
  11. s/AUX_SINGLE/GLUT_SINGLE/g
  12. s/AUX_DOUBLE/GLUT_DOUBLE/g
  13. s/AUX_RGB/GLUT_RGB/g
  14. s/AUX_RGBA/GLUT_RGBA/g
  15. s/AUX_ACCUM/GLUT_ACCUM/g
  16. s/AUX_DEPTH/GLUT_DEPTH/g
  17. s/AUX_STENCIL/GLUT_STENCIL/g
  18. s/AUX_ALPHA/GLUT_ALPHA/g
  19. s/AUX_MOUSEDOWN/GLUT_DOWN/g
  20. s/AUX_MOUSEUP/GLUT_UP/g
  21. s/AUX_LEFTBUTTON/GLUT_LEFT_BUTTON/g
  22. s/AUX_MIDDLEBUTTON/GLUT_MIDDLE_BUTTON/g
  23. s/AUX_RIGHTBUTTON/GLUT_RIGHT_BUTTON/g
  24. s/(.*AUX_EVENTREC.*)/( int x, int y )/g
  25. s/auxReshapeFunc/glutReshapeFunc/g
  26. s/#include "aux.h"/#include <GL/glut.h>/g
  27. s/#include[ ]*<aux.h>/#include <GL/glut.h>/g
  28. s/(initialize.*$)/glutInit(&argc, argv); 1/g
  29. s/auxInitDisplayMode/glutInitDisplayMode/g
  30. s/auxMainLoop(display)/glutDisplayFunc(display); glutMainLoop()/g
  31. s/auxMainLoop[ ]*([ ]*drawScene[ ]*)/glutDisplayFunc(drawScene); glutMainLoop()/g
  32. s/auxAnimation.*$/glutIdleFunc(drawScene);/g
  33. s/auxGetScreenSize.*$/width = glutGet(GLUT_SCREEN_WIDTH); height = glutGet(GLUT_SCREEN_HEIGHT);/g
  34. s/auxGetSize.*$/width = glutGet(GLUT_WINDOW_WIDTH); height = glutGet(GLUT_WINDOW_HEIGHT);/g
  35. s/auxInitPosition((.*),(.*),(.*),(.*));/glutInitWindowPosition(1,2); glutInitWindowSize(3,4);/g
  36. s/auxSwapBuffers/glutSwapBuffers/g
  37. s/auxWireIcosahedron/glutWireIcosahedron/g
  38. s/auxSolidIcosahedron/glutSolidIcosahedron/g
  39. s/auxSolidTorus/glutSolidTorus/g
  40. s/auxWireTorus/glutWireTorus/g
  41. s/auxSolidCube/glutSolidCube/g
  42. s/auxWireCube/glutWireCube/g
  43. s/auxSolidSphere/glutSolidSphere/g
  44. s/auxWireSphere/glutWireSphere/g
  45. s/auxSolidCone/glutSolidCone/g
  46. s/auxWireCone/glutWireCone/g
  47. s/auxSolidOctahedron/glutSolidOctahedron/g
  48. s/auxWireOctahedron/glutWireOctahedron/g
  49. s/auxSolidTeapot/glutSoliddTeapot/g
  50. s/auxWireTeapot/glutWireTeapot/g
  51. s/auxKeyFunc(.*,/glutKeyboardFunc(/g
  52. s/auxMouseFunc(.*AUX_MOUSELOC,.*NULL,/glutMouseMotion(/g
  53. s/auxMouseFunc/glutMouseFunc/g
  54. s/auxDeleteMouseFunc( .*$/glutMouseMotion( NULL );/g