home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Multimedia / k3d-setup-0.7.11.0.exe / lib / site-packages / OpenGL / GLUT / freeglut.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  8.9 KB  |  258 lines

  1. """FreeGLUT extensions to the GLUT API
  2.  
  3. This module will provide the FreeGLUT extensions if they are available
  4. from the GLUT module.  Note that any other implementation that also provides
  5. these entry points will also retrieve the entry points with this module.
  6. """
  7. # flags 'freeglut_ext.xml -l /usr/lib64/libglut.so -o freeglut_ext.py -v -kf'
  8. from OpenGL import platform, arrays
  9. from OpenGL.constants import *
  10. from OpenGL import constant
  11. FUNCTION_TYPE = platform.PLATFORM.functionTypeFor( platform.GLUT )
  12.  
  13. import ctypes
  14. c_int = ctypes.c_int 
  15. c_char_p = ctypes.c_char_p
  16. c_ubyte = ctypes.c_ubyte
  17. c_void_p = ctypes.c_void_p
  18. from OpenGL.GLUT import special
  19.  
  20. GLUT_ACTION_EXIT = constant.Constant( 'GLUT_ACTION_EXIT', 0 )
  21. GLUT_ACTION_GLUTMAINLOOP_RETURNS = constant.Constant( 'GLUT_ACTION_GLUTMAINLOOP_RETURNS', 1 )
  22. GLUT_ACTION_CONTINUE_EXECUTION = constant.Constant( 'GLUT_ACTION_CONTINUE_EXECUTION', 2 )
  23.  
  24. GLUT_CREATE_NEW_CONTEXT = constant.Constant( 'GLUT_CREATE_NEW_CONTEXT', 0 )
  25. GLUT_USE_CURRENT_CONTEXT = constant.Constant( 'GLUT_USE_CURRENT_CONTEXT', 1 )
  26.  
  27. GLUT_ACTION_ON_WINDOW_CLOSE = constant.Constant( 'GLUT_ACTION_ON_WINDOW_CLOSE', 0x01F9 )
  28. GLUT_WINDOW_BORDER_WIDTH = constant.Constant( 'GLUT_WINDOW_BORDER_WIDTH', 0x01FA )
  29. GLUT_WINDOW_HEADER_HEIGHT = constant.Constant( 'GLUT_USE_CURRENT_CONTEXT', 0x01FB )
  30. #GLUT_VERSION = constant.Constant( 'GLUT_VERSION', 0x01FC )
  31. GLUT_RENDERING_CONTEXT = constant.Constant( 'GLUT_RENDERING_CONTEXT', 0x01FD )
  32.  
  33. # /usr/include/GL/freeglut_ext.h 63
  34. glutMainLoopEvent = platform.createBaseFunction( 
  35.     'glutMainLoopEvent', dll=platform.GLUT, resultType=None, 
  36.     argTypes=[],
  37.     doc='glutMainLoopEvent(  ) -> None', 
  38.     argNames=(),
  39. )
  40. # /usr/include/GL/freeglut_ext.h 64
  41. glutLeaveMainLoop = platform.createBaseFunction( 
  42.     'glutLeaveMainLoop', dll=platform.GLUT, resultType=None, 
  43.     argTypes=[],
  44.     doc='glutLeaveMainLoop(  ) -> None', 
  45.     argNames=(),
  46. )
  47.  
  48. # /usr/include/GL/freeglut_ext.h 69
  49. ##glutMouseWheelFunc = platform.createBaseFunction( 
  50. ##    'glutMouseWheelFunc', dll=platform.GLUT, resultType=None, 
  51. ##    argTypes=[FUNCTION_TYPE(None, c_int, c_int, c_int, c_int)],
  52. ##    doc='glutMouseWheelFunc( FUNCTION_TYPE(None, c_int, c_int, c_int, c_int)(callback) ) -> None', 
  53. ##    argNames=('callback',),
  54. ##)
  55. glutMouseWheelFunc = special.GLUTCallback(
  56.     'MouseWheel', (c_int, c_int, c_int, c_int,), ('wheel','direction','x','y'),
  57. )
  58.  
  59.  
  60. # /usr/include/GL/freeglut_ext.h 70
  61. ##glutCloseFunc = platform.createBaseFunction( 
  62. ##    'glutCloseFunc', dll=platform.GLUT, resultType=None, 
  63. ##    argTypes=[FUNCTION_TYPE(None)],
  64. ##    doc='glutCloseFunc( FUNCTION_TYPE(None)(callback) ) -> None', 
  65. ##    argNames=('callback',),
  66. ##)
  67. glutCloseFunc = special.GLUTCallback(
  68.     'Close', (), (),
  69. )
  70.  
  71. # /usr/include/GL/freeglut_ext.h 71
  72. ##glutWMCloseFunc = platform.createBaseFunction( 
  73. ##    'glutWMCloseFunc', dll=platform.GLUT, resultType=None, 
  74. ##    argTypes=[FUNCTION_TYPE(None)],
  75. ##    doc='glutWMCloseFunc( FUNCTION_TYPE(None)(callback) ) -> None', 
  76. ##    argNames=('callback',),
  77. ##)
  78. glutWMCloseFunc = special.GLUTCallback(
  79.     'WMClose', (), (),
  80. )
  81.  
  82. # /usr/include/GL/freeglut_ext.h 73
  83. ##glutMenuDestroyFunc = platform.createBaseFunction( 
  84. ##    'glutMenuDestroyFunc', dll=platform.GLUT, resultType=None, 
  85. ##    argTypes=[FUNCTION_TYPE(None)],
  86. ##    doc='glutMenuDestroyFunc( FUNCTION_TYPE(None)(callback) ) -> None', 
  87. ##    argNames=('callback',),
  88. ##)
  89. glutMenuDestroyFunc = special.GLUTCallback(
  90.     'MenuDestroy', (), (),
  91. )
  92.  
  93. # /usr/include/GL/freeglut_ext.h 78
  94. glutSetOption = platform.createBaseFunction( 
  95.     'glutSetOption', dll=platform.GLUT, resultType=None, 
  96.     argTypes=[GLenum, c_int],
  97.     doc='glutSetOption( GLenum(option_flag), c_int(value) ) -> None', 
  98.     argNames=('option_flag', 'value'),
  99. )
  100.  
  101. # /usr/include/GL/freeglut_ext.h 80
  102. glutGetWindowData = platform.createBaseFunction( 
  103.     'glutGetWindowData', dll=platform.GLUT, resultType=c_void_p, 
  104.     argTypes=[],
  105.     doc='glutGetWindowData(  ) -> c_void_p', 
  106.     argNames=(),
  107. )
  108.  
  109. # /usr/include/GL/freeglut_ext.h 81
  110. glutSetWindowData = platform.createBaseFunction( 
  111.     'glutSetWindowData', dll=platform.GLUT, resultType=None, 
  112.     argTypes=[c_void_p],
  113.     doc='glutSetWindowData( c_void_p(data) ) -> None', 
  114.     argNames=('data',),
  115. )
  116.  
  117. # /usr/include/GL/freeglut_ext.h 82
  118. glutGetMenuData = platform.createBaseFunction( 
  119.     'glutGetMenuData', dll=platform.GLUT, resultType=c_void_p, 
  120.     argTypes=[],
  121.     doc='glutGetMenuData(  ) -> c_void_p', 
  122.     argNames=(),
  123. )
  124.  
  125. # /usr/include/GL/freeglut_ext.h 83
  126. glutSetMenuData = platform.createBaseFunction( 
  127.     'glutSetMenuData', dll=platform.GLUT, resultType=None, 
  128.     argTypes=[c_void_p],
  129.     doc='glutSetMenuData( c_void_p(data) ) -> None', 
  130.     argNames=('data',),
  131. )
  132.  
  133. # /usr/include/GL/freeglut_ext.h 88
  134. glutBitmapHeight = platform.createBaseFunction( 
  135.     'glutBitmapHeight', dll=platform.GLUT, resultType=c_int, 
  136.     argTypes=[c_void_p],
  137.     doc='glutBitmapHeight( c_void_p(font) ) -> c_int', 
  138.     argNames=('font',),
  139. )
  140.  
  141. # /usr/include/GL/freeglut_ext.h 89
  142. glutStrokeHeight = platform.createBaseFunction( 
  143.     'glutStrokeHeight', dll=platform.GLUT, resultType=GLfloat, 
  144.     argTypes=[c_void_p],
  145.     doc='glutStrokeHeight( c_void_p(font) ) -> GLfloat', 
  146.     argNames=('font',),
  147. )
  148.  
  149. # /usr/include/GL/freeglut_ext.h 90
  150. glutBitmapString = platform.createBaseFunction( 
  151.     'glutBitmapString', dll=platform.GLUT, resultType=None, 
  152.     argTypes=[c_void_p, c_char_p],
  153.     doc='glutBitmapString( c_void_p(font), POINTER(c_ubyte)(string) ) -> None', 
  154.     argNames=('font', 'string'),
  155. )
  156. ##glutBitmapString = platform.createBaseFunction( 
  157. ##    'glutBitmapString', dll=platform.GLUT, resultType=None, 
  158. ##    argTypes=[c_void_p, arrays.GLubyteArray],
  159. ##    doc='glutBitmapString( c_void_p(font), POINTER(c_ubyte)(string) ) -> None', 
  160. ##    argNames=('font', 'string'),
  161. ##)
  162. ##glutBitmapString = arrays.setInputArraySizeType(
  163. ##    glutBitmapString,
  164. ##    None, 
  165. ##    arrays.GLubyteArray, 
  166. ##    'string',
  167. ##)
  168.  
  169. # /usr/include/GL/freeglut_ext.h 91
  170. glutStrokeString = platform.createBaseFunction( 
  171.     'glutStrokeString', dll=platform.GLUT, resultType=None, 
  172.     argTypes=[c_void_p, c_char_p],
  173.     doc='glutStrokeString( c_void_p(font), POINTER(c_ubyte)(string) ) -> None', 
  174.     argNames=('font', 'string'),
  175. )
  176. ##glutStrokeString = platform.createBaseFunction( 
  177. ##    'glutStrokeString', dll=platform.GLUT, resultType=None, 
  178. ##    argTypes=[c_void_p, arrays.GLubyteArray],
  179. ##    doc='glutStrokeString( c_void_p(font), POINTER(c_ubyte)(string) ) -> None', 
  180. ##    argNames=('font', 'string'),
  181. ##)
  182. ##glutStrokeString = arrays.setInputArraySizeType(
  183. ##    glutStrokeString,
  184. ##    None, 
  185. ##    arrays.GLubyteArray, 
  186. ##    'string',
  187. ##)
  188.  
  189. # /usr/include/GL/freeglut_ext.h 96
  190. glutWireRhombicDodecahedron = platform.createBaseFunction( 
  191.     'glutWireRhombicDodecahedron', dll=platform.GLUT, resultType=None, 
  192.     argTypes=[],
  193.     doc='glutWireRhombicDodecahedron(  ) -> None', 
  194.     argNames=(),
  195. )
  196.  
  197. # /usr/include/GL/freeglut_ext.h 97
  198. glutSolidRhombicDodecahedron = platform.createBaseFunction( 
  199.     'glutSolidRhombicDodecahedron', dll=platform.GLUT, resultType=None, 
  200.     argTypes=[],
  201.     doc='glutSolidRhombicDodecahedron(  ) -> None', 
  202.     argNames=(),
  203. )
  204.  
  205. # /usr/include/GL/freeglut_ext.h 98
  206. glutWireSierpinskiSponge = platform.createBaseFunction( 
  207.     'glutWireSierpinskiSponge', dll=platform.GLUT, resultType=None, 
  208.     argTypes=[c_int, arrays.GLdoubleArray, GLdouble],
  209.     doc='glutWireSierpinskiSponge( c_int(num_levels), arrays.GLdoubleArray(offset), GLdouble(scale) ) -> None', 
  210.     argNames=('num_levels', 'offset', 'scale'),
  211. )
  212.  
  213. glutWireSierpinskiSponge = arrays.setInputArraySizeType(
  214.     glutWireSierpinskiSponge,
  215.     None, # XXX Could not determine size of argument offset for glutWireSierpinskiSponge arrays.GLdoubleArray
  216.     arrays.GLdoubleArray, 
  217.     'offset',
  218. )
  219.  
  220. # /usr/include/GL/freeglut_ext.h 99
  221. glutSolidSierpinskiSponge = platform.createBaseFunction( 
  222.     'glutSolidSierpinskiSponge', dll=platform.GLUT, resultType=None, 
  223.     argTypes=[c_int, arrays.GLdoubleArray, GLdouble],
  224.     doc='glutSolidSierpinskiSponge( c_int(num_levels), arrays.GLdoubleArray(offset), GLdouble(scale) ) -> None', 
  225.     argNames=('num_levels', 'offset', 'scale'),
  226. )
  227.  
  228. glutSolidSierpinskiSponge = arrays.setInputArraySizeType(
  229.     glutSolidSierpinskiSponge,
  230.     None, # XXX Could not determine size of argument offset for glutSolidSierpinskiSponge arrays.GLdoubleArray
  231.     arrays.GLdoubleArray, 
  232.     'offset',
  233. )
  234.  
  235. # /usr/include/GL/freeglut_ext.h 100
  236. glutWireCylinder = platform.createBaseFunction( 
  237.     'glutWireCylinder', dll=platform.GLUT, resultType=None, 
  238.     argTypes=[GLdouble, GLdouble, GLint, GLint],
  239.     doc='glutWireCylinder( GLdouble(radius), GLdouble(height), GLint(slices), GLint(stacks) ) -> None', 
  240.     argNames=('radius', 'height', 'slices', 'stacks'),
  241. )
  242.  
  243. # /usr/include/GL/freeglut_ext.h 101
  244. glutSolidCylinder = platform.createBaseFunction( 
  245.     'glutSolidCylinder', dll=platform.GLUT, resultType=None, 
  246.     argTypes=[GLdouble, GLdouble, GLint, GLint],
  247.     doc='glutSolidCylinder( GLdouble(radius), GLdouble(height), GLint(slices), GLint(stacks) ) -> None', 
  248.     argNames=('radius', 'height', 'slices', 'stacks'),
  249. )
  250.  
  251. # /usr/include/GL/freeglut_ext.h 106
  252. glutGetProcAddress = platform.createBaseFunction( 
  253.     'glutGetProcAddress', dll=platform.GLUT, resultType=c_void_p, 
  254.     argTypes=[c_char_p],
  255.     doc='glutGetProcAddress( STRING(procName) ) -> c_void_p', 
  256.     argNames=('procName',),
  257. )
  258.