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 / raw / GL / NV / half_float.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  15.0 KB  |  450 lines

  1. '''OpenGL extension NV.half_float
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension introduces a new storage format and data type for
  6.     half-precision (16-bit) floating-point quantities.  The floating-point
  7.     format is very similar to the IEEE single-precision floating-point
  8.     standard, except that it has only 5 exponent bits and 10 mantissa bits.
  9.     Half-precision floats are smaller than full precision floats and provide a
  10.     larger dynamic range than similarly-sized normalized scalar data types.
  11.     
  12.     This extension allows applications to use half-precision floating point
  13.     data when specifying vertices or pixel data.  It adds new commands to
  14.     specify vertex attributes using the new data type, and extends the
  15.     existing vertex array and image specification commands to accept the new
  16.     data type.
  17.     
  18.     This storage format is also used to represent 16-bit components in the
  19.     floating-point frame buffers, as defined in the NV_float_buffer extension.
  20.  
  21. The official definition of this extension is available here:
  22.     http://oss.sgi.com/projects/ogl-sample/registry/NV/half_float.txt
  23.  
  24. Automatically generated by the get_gl_extensions script, do not edit!
  25. '''
  26. from OpenGL import platform, constants, constant, arrays
  27. from OpenGL import extensions
  28. from OpenGL.GL import glget
  29. import ctypes
  30. EXTENSION_NAME = 'GL_NV_half_float'
  31. GL_HALF_FLOAT_NV = constant.Constant( 'GL_HALF_FLOAT_NV', 0x140B )
  32. glVertex2hNV = platform.createExtensionFunction( 
  33.     'glVertex2hNV', dll=platform.GL,
  34.     extension=EXTENSION_NAME,
  35.     resultType=None, 
  36.     argTypes=(constants.GLhalfNV, constants.GLhalfNV,),
  37.     doc = 'glVertex2hNV( GLhalfNV(x), GLhalfNV(y) ) -> None',
  38.     argNames = ('x', 'y',),
  39. )
  40.  
  41. glVertex2hvNV = platform.createExtensionFunction( 
  42.     'glVertex2hvNV', dll=platform.GL,
  43.     extension=EXTENSION_NAME,
  44.     resultType=None, 
  45.     argTypes=(arrays.GLushortArray,),
  46.     doc = 'glVertex2hvNV( GLushortArray(v) ) -> None',
  47.     argNames = ('v',),
  48. )
  49.  
  50. glVertex3hNV = platform.createExtensionFunction( 
  51.     'glVertex3hNV', dll=platform.GL,
  52.     extension=EXTENSION_NAME,
  53.     resultType=None, 
  54.     argTypes=(constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  55.     doc = 'glVertex3hNV( GLhalfNV(x), GLhalfNV(y), GLhalfNV(z) ) -> None',
  56.     argNames = ('x', 'y', 'z',),
  57. )
  58.  
  59. glVertex3hvNV = platform.createExtensionFunction( 
  60.     'glVertex3hvNV', dll=platform.GL,
  61.     extension=EXTENSION_NAME,
  62.     resultType=None, 
  63.     argTypes=(arrays.GLushortArray,),
  64.     doc = 'glVertex3hvNV( GLushortArray(v) ) -> None',
  65.     argNames = ('v',),
  66. )
  67.  
  68. glVertex4hNV = platform.createExtensionFunction( 
  69.     'glVertex4hNV', dll=platform.GL,
  70.     extension=EXTENSION_NAME,
  71.     resultType=None, 
  72.     argTypes=(constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  73.     doc = 'glVertex4hNV( GLhalfNV(x), GLhalfNV(y), GLhalfNV(z), GLhalfNV(w) ) -> None',
  74.     argNames = ('x', 'y', 'z', 'w',),
  75. )
  76.  
  77. glVertex4hvNV = platform.createExtensionFunction( 
  78.     'glVertex4hvNV', dll=platform.GL,
  79.     extension=EXTENSION_NAME,
  80.     resultType=None, 
  81.     argTypes=(arrays.GLushortArray,),
  82.     doc = 'glVertex4hvNV( GLushortArray(v) ) -> None',
  83.     argNames = ('v',),
  84. )
  85.  
  86. glNormal3hNV = platform.createExtensionFunction( 
  87.     'glNormal3hNV', dll=platform.GL,
  88.     extension=EXTENSION_NAME,
  89.     resultType=None, 
  90.     argTypes=(constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  91.     doc = 'glNormal3hNV( GLhalfNV(nx), GLhalfNV(ny), GLhalfNV(nz) ) -> None',
  92.     argNames = ('nx', 'ny', 'nz',),
  93. )
  94.  
  95. glNormal3hvNV = platform.createExtensionFunction( 
  96.     'glNormal3hvNV', dll=platform.GL,
  97.     extension=EXTENSION_NAME,
  98.     resultType=None, 
  99.     argTypes=(arrays.GLushortArray,),
  100.     doc = 'glNormal3hvNV( GLushortArray(v) ) -> None',
  101.     argNames = ('v',),
  102. )
  103.  
  104. glColor3hNV = platform.createExtensionFunction( 
  105.     'glColor3hNV', dll=platform.GL,
  106.     extension=EXTENSION_NAME,
  107.     resultType=None, 
  108.     argTypes=(constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  109.     doc = 'glColor3hNV( GLhalfNV(red), GLhalfNV(green), GLhalfNV(blue) ) -> None',
  110.     argNames = ('red', 'green', 'blue',),
  111. )
  112.  
  113. glColor3hvNV = platform.createExtensionFunction( 
  114.     'glColor3hvNV', dll=platform.GL,
  115.     extension=EXTENSION_NAME,
  116.     resultType=None, 
  117.     argTypes=(arrays.GLushortArray,),
  118.     doc = 'glColor3hvNV( GLushortArray(v) ) -> None',
  119.     argNames = ('v',),
  120. )
  121.  
  122. glColor4hNV = platform.createExtensionFunction( 
  123.     'glColor4hNV', dll=platform.GL,
  124.     extension=EXTENSION_NAME,
  125.     resultType=None, 
  126.     argTypes=(constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  127.     doc = 'glColor4hNV( GLhalfNV(red), GLhalfNV(green), GLhalfNV(blue), GLhalfNV(alpha) ) -> None',
  128.     argNames = ('red', 'green', 'blue', 'alpha',),
  129. )
  130.  
  131. glColor4hvNV = platform.createExtensionFunction( 
  132.     'glColor4hvNV', dll=platform.GL,
  133.     extension=EXTENSION_NAME,
  134.     resultType=None, 
  135.     argTypes=(arrays.GLushortArray,),
  136.     doc = 'glColor4hvNV( GLushortArray(v) ) -> None',
  137.     argNames = ('v',),
  138. )
  139.  
  140. glTexCoord1hNV = platform.createExtensionFunction( 
  141.     'glTexCoord1hNV', dll=platform.GL,
  142.     extension=EXTENSION_NAME,
  143.     resultType=None, 
  144.     argTypes=(constants.GLhalfNV,),
  145.     doc = 'glTexCoord1hNV( GLhalfNV(s) ) -> None',
  146.     argNames = ('s',),
  147. )
  148.  
  149. glTexCoord1hvNV = platform.createExtensionFunction( 
  150.     'glTexCoord1hvNV', dll=platform.GL,
  151.     extension=EXTENSION_NAME,
  152.     resultType=None, 
  153.     argTypes=(arrays.GLushortArray,),
  154.     doc = 'glTexCoord1hvNV( GLushortArray(v) ) -> None',
  155.     argNames = ('v',),
  156. )
  157.  
  158. glTexCoord2hNV = platform.createExtensionFunction( 
  159.     'glTexCoord2hNV', dll=platform.GL,
  160.     extension=EXTENSION_NAME,
  161.     resultType=None, 
  162.     argTypes=(constants.GLhalfNV, constants.GLhalfNV,),
  163.     doc = 'glTexCoord2hNV( GLhalfNV(s), GLhalfNV(t) ) -> None',
  164.     argNames = ('s', 't',),
  165. )
  166.  
  167. glTexCoord2hvNV = platform.createExtensionFunction( 
  168.     'glTexCoord2hvNV', dll=platform.GL,
  169.     extension=EXTENSION_NAME,
  170.     resultType=None, 
  171.     argTypes=(arrays.GLushortArray,),
  172.     doc = 'glTexCoord2hvNV( GLushortArray(v) ) -> None',
  173.     argNames = ('v',),
  174. )
  175.  
  176. glTexCoord3hNV = platform.createExtensionFunction( 
  177.     'glTexCoord3hNV', dll=platform.GL,
  178.     extension=EXTENSION_NAME,
  179.     resultType=None, 
  180.     argTypes=(constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  181.     doc = 'glTexCoord3hNV( GLhalfNV(s), GLhalfNV(t), GLhalfNV(r) ) -> None',
  182.     argNames = ('s', 't', 'r',),
  183. )
  184.  
  185. glTexCoord3hvNV = platform.createExtensionFunction( 
  186.     'glTexCoord3hvNV', dll=platform.GL,
  187.     extension=EXTENSION_NAME,
  188.     resultType=None, 
  189.     argTypes=(arrays.GLushortArray,),
  190.     doc = 'glTexCoord3hvNV( GLushortArray(v) ) -> None',
  191.     argNames = ('v',),
  192. )
  193.  
  194. glTexCoord4hNV = platform.createExtensionFunction( 
  195.     'glTexCoord4hNV', dll=platform.GL,
  196.     extension=EXTENSION_NAME,
  197.     resultType=None, 
  198.     argTypes=(constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  199.     doc = 'glTexCoord4hNV( GLhalfNV(s), GLhalfNV(t), GLhalfNV(r), GLhalfNV(q) ) -> None',
  200.     argNames = ('s', 't', 'r', 'q',),
  201. )
  202.  
  203. glTexCoord4hvNV = platform.createExtensionFunction( 
  204.     'glTexCoord4hvNV', dll=platform.GL,
  205.     extension=EXTENSION_NAME,
  206.     resultType=None, 
  207.     argTypes=(arrays.GLushortArray,),
  208.     doc = 'glTexCoord4hvNV( GLushortArray(v) ) -> None',
  209.     argNames = ('v',),
  210. )
  211.  
  212. glMultiTexCoord1hNV = platform.createExtensionFunction( 
  213.     'glMultiTexCoord1hNV', dll=platform.GL,
  214.     extension=EXTENSION_NAME,
  215.     resultType=None, 
  216.     argTypes=(constants.GLenum, constants.GLhalfNV,),
  217.     doc = 'glMultiTexCoord1hNV( GLenum(target), GLhalfNV(s) ) -> None',
  218.     argNames = ('target', 's',),
  219. )
  220.  
  221. glMultiTexCoord1hvNV = platform.createExtensionFunction( 
  222.     'glMultiTexCoord1hvNV', dll=platform.GL,
  223.     extension=EXTENSION_NAME,
  224.     resultType=None, 
  225.     argTypes=(constants.GLenum, arrays.GLushortArray,),
  226.     doc = 'glMultiTexCoord1hvNV( GLenum(target), GLushortArray(v) ) -> None',
  227.     argNames = ('target', 'v',),
  228. )
  229.  
  230. glMultiTexCoord2hNV = platform.createExtensionFunction( 
  231.     'glMultiTexCoord2hNV', dll=platform.GL,
  232.     extension=EXTENSION_NAME,
  233.     resultType=None, 
  234.     argTypes=(constants.GLenum, constants.GLhalfNV, constants.GLhalfNV,),
  235.     doc = 'glMultiTexCoord2hNV( GLenum(target), GLhalfNV(s), GLhalfNV(t) ) -> None',
  236.     argNames = ('target', 's', 't',),
  237. )
  238.  
  239. glMultiTexCoord2hvNV = platform.createExtensionFunction( 
  240.     'glMultiTexCoord2hvNV', dll=platform.GL,
  241.     extension=EXTENSION_NAME,
  242.     resultType=None, 
  243.     argTypes=(constants.GLenum, arrays.GLushortArray,),
  244.     doc = 'glMultiTexCoord2hvNV( GLenum(target), GLushortArray(v) ) -> None',
  245.     argNames = ('target', 'v',),
  246. )
  247.  
  248. glMultiTexCoord3hNV = platform.createExtensionFunction( 
  249.     'glMultiTexCoord3hNV', dll=platform.GL,
  250.     extension=EXTENSION_NAME,
  251.     resultType=None, 
  252.     argTypes=(constants.GLenum, constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  253.     doc = 'glMultiTexCoord3hNV( GLenum(target), GLhalfNV(s), GLhalfNV(t), GLhalfNV(r) ) -> None',
  254.     argNames = ('target', 's', 't', 'r',),
  255. )
  256.  
  257. glMultiTexCoord3hvNV = platform.createExtensionFunction( 
  258.     'glMultiTexCoord3hvNV', dll=platform.GL,
  259.     extension=EXTENSION_NAME,
  260.     resultType=None, 
  261.     argTypes=(constants.GLenum, arrays.GLushortArray,),
  262.     doc = 'glMultiTexCoord3hvNV( GLenum(target), GLushortArray(v) ) -> None',
  263.     argNames = ('target', 'v',),
  264. )
  265.  
  266. glMultiTexCoord4hNV = platform.createExtensionFunction( 
  267.     'glMultiTexCoord4hNV', dll=platform.GL,
  268.     extension=EXTENSION_NAME,
  269.     resultType=None, 
  270.     argTypes=(constants.GLenum, constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  271.     doc = 'glMultiTexCoord4hNV( GLenum(target), GLhalfNV(s), GLhalfNV(t), GLhalfNV(r), GLhalfNV(q) ) -> None',
  272.     argNames = ('target', 's', 't', 'r', 'q',),
  273. )
  274.  
  275. glMultiTexCoord4hvNV = platform.createExtensionFunction( 
  276.     'glMultiTexCoord4hvNV', dll=platform.GL,
  277.     extension=EXTENSION_NAME,
  278.     resultType=None, 
  279.     argTypes=(constants.GLenum, arrays.GLushortArray,),
  280.     doc = 'glMultiTexCoord4hvNV( GLenum(target), GLushortArray(v) ) -> None',
  281.     argNames = ('target', 'v',),
  282. )
  283.  
  284. glFogCoordhNV = platform.createExtensionFunction( 
  285.     'glFogCoordhNV', dll=platform.GL,
  286.     extension=EXTENSION_NAME,
  287.     resultType=None, 
  288.     argTypes=(constants.GLhalfNV,),
  289.     doc = 'glFogCoordhNV( GLhalfNV(fog) ) -> None',
  290.     argNames = ('fog',),
  291. )
  292.  
  293. glFogCoordhvNV = platform.createExtensionFunction( 
  294.     'glFogCoordhvNV', dll=platform.GL,
  295.     extension=EXTENSION_NAME,
  296.     resultType=None, 
  297.     argTypes=(arrays.GLushortArray,),
  298.     doc = 'glFogCoordhvNV( GLushortArray(fog) ) -> None',
  299.     argNames = ('fog',),
  300. )
  301.  
  302. glSecondaryColor3hNV = platform.createExtensionFunction( 
  303.     'glSecondaryColor3hNV', dll=platform.GL,
  304.     extension=EXTENSION_NAME,
  305.     resultType=None, 
  306.     argTypes=(constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  307.     doc = 'glSecondaryColor3hNV( GLhalfNV(red), GLhalfNV(green), GLhalfNV(blue) ) -> None',
  308.     argNames = ('red', 'green', 'blue',),
  309. )
  310.  
  311. glSecondaryColor3hvNV = platform.createExtensionFunction( 
  312.     'glSecondaryColor3hvNV', dll=platform.GL,
  313.     extension=EXTENSION_NAME,
  314.     resultType=None, 
  315.     argTypes=(arrays.GLushortArray,),
  316.     doc = 'glSecondaryColor3hvNV( GLushortArray(v) ) -> None',
  317.     argNames = ('v',),
  318. )
  319.  
  320. glVertexWeighthNV = platform.createExtensionFunction( 
  321.     'glVertexWeighthNV', dll=platform.GL,
  322.     extension=EXTENSION_NAME,
  323.     resultType=None, 
  324.     argTypes=(constants.GLhalfNV,),
  325.     doc = 'glVertexWeighthNV( GLhalfNV(weight) ) -> None',
  326.     argNames = ('weight',),
  327. )
  328.  
  329. glVertexWeighthvNV = platform.createExtensionFunction( 
  330.     'glVertexWeighthvNV', dll=platform.GL,
  331.     extension=EXTENSION_NAME,
  332.     resultType=None, 
  333.     argTypes=(arrays.GLushortArray,),
  334.     doc = 'glVertexWeighthvNV( GLushortArray(weight) ) -> None',
  335.     argNames = ('weight',),
  336. )
  337.  
  338. glVertexAttrib1hNV = platform.createExtensionFunction( 
  339.     'glVertexAttrib1hNV', dll=platform.GL,
  340.     extension=EXTENSION_NAME,
  341.     resultType=None, 
  342.     argTypes=(constants.GLuint, constants.GLhalfNV,),
  343.     doc = 'glVertexAttrib1hNV( GLuint(index), GLhalfNV(x) ) -> None',
  344.     argNames = ('index', 'x',),
  345. )
  346.  
  347. glVertexAttrib1hvNV = platform.createExtensionFunction( 
  348.     'glVertexAttrib1hvNV', dll=platform.GL,
  349.     extension=EXTENSION_NAME,
  350.     resultType=None, 
  351.     argTypes=(constants.GLuint, arrays.GLushortArray,),
  352.     doc = 'glVertexAttrib1hvNV( GLuint(index), GLushortArray(v) ) -> None',
  353.     argNames = ('index', 'v',),
  354. )
  355.  
  356. glVertexAttrib2hNV = platform.createExtensionFunction( 
  357.     'glVertexAttrib2hNV', dll=platform.GL,
  358.     extension=EXTENSION_NAME,
  359.     resultType=None, 
  360.     argTypes=(constants.GLuint, constants.GLhalfNV, constants.GLhalfNV,),
  361.     doc = 'glVertexAttrib2hNV( GLuint(index), GLhalfNV(x), GLhalfNV(y) ) -> None',
  362.     argNames = ('index', 'x', 'y',),
  363. )
  364.  
  365. glVertexAttrib2hvNV = platform.createExtensionFunction( 
  366.     'glVertexAttrib2hvNV', dll=platform.GL,
  367.     extension=EXTENSION_NAME,
  368.     resultType=None, 
  369.     argTypes=(constants.GLuint, arrays.GLushortArray,),
  370.     doc = 'glVertexAttrib2hvNV( GLuint(index), GLushortArray(v) ) -> None',
  371.     argNames = ('index', 'v',),
  372. )
  373.  
  374. glVertexAttrib3hNV = platform.createExtensionFunction( 
  375.     'glVertexAttrib3hNV', dll=platform.GL,
  376.     extension=EXTENSION_NAME,
  377.     resultType=None, 
  378.     argTypes=(constants.GLuint, constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  379.     doc = 'glVertexAttrib3hNV( GLuint(index), GLhalfNV(x), GLhalfNV(y), GLhalfNV(z) ) -> None',
  380.     argNames = ('index', 'x', 'y', 'z',),
  381. )
  382.  
  383. glVertexAttrib3hvNV = platform.createExtensionFunction( 
  384.     'glVertexAttrib3hvNV', dll=platform.GL,
  385.     extension=EXTENSION_NAME,
  386.     resultType=None, 
  387.     argTypes=(constants.GLuint, arrays.GLushortArray,),
  388.     doc = 'glVertexAttrib3hvNV( GLuint(index), GLushortArray(v) ) -> None',
  389.     argNames = ('index', 'v',),
  390. )
  391.  
  392. glVertexAttrib4hNV = platform.createExtensionFunction( 
  393.     'glVertexAttrib4hNV', dll=platform.GL,
  394.     extension=EXTENSION_NAME,
  395.     resultType=None, 
  396.     argTypes=(constants.GLuint, constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV, constants.GLhalfNV,),
  397.     doc = 'glVertexAttrib4hNV( GLuint(index), GLhalfNV(x), GLhalfNV(y), GLhalfNV(z), GLhalfNV(w) ) -> None',
  398.     argNames = ('index', 'x', 'y', 'z', 'w',),
  399. )
  400.  
  401. glVertexAttrib4hvNV = platform.createExtensionFunction( 
  402.     'glVertexAttrib4hvNV', dll=platform.GL,
  403.     extension=EXTENSION_NAME,
  404.     resultType=None, 
  405.     argTypes=(constants.GLuint, arrays.GLushortArray,),
  406.     doc = 'glVertexAttrib4hvNV( GLuint(index), GLushortArray(v) ) -> None',
  407.     argNames = ('index', 'v',),
  408. )
  409.  
  410. glVertexAttribs1hvNV = platform.createExtensionFunction( 
  411.     'glVertexAttribs1hvNV', dll=platform.GL,
  412.     extension=EXTENSION_NAME,
  413.     resultType=None, 
  414.     argTypes=(constants.GLuint, constants.GLsizei, arrays.GLushortArray,),
  415.     doc = 'glVertexAttribs1hvNV( GLuint(index), GLsizei(n), GLushortArray(v) ) -> None',
  416.     argNames = ('index', 'n', 'v',),
  417. )
  418.  
  419. glVertexAttribs2hvNV = platform.createExtensionFunction( 
  420.     'glVertexAttribs2hvNV', dll=platform.GL,
  421.     extension=EXTENSION_NAME,
  422.     resultType=None, 
  423.     argTypes=(constants.GLuint, constants.GLsizei, arrays.GLushortArray,),
  424.     doc = 'glVertexAttribs2hvNV( GLuint(index), GLsizei(n), GLushortArray(v) ) -> None',
  425.     argNames = ('index', 'n', 'v',),
  426. )
  427.  
  428. glVertexAttribs3hvNV = platform.createExtensionFunction( 
  429.     'glVertexAttribs3hvNV', dll=platform.GL,
  430.     extension=EXTENSION_NAME,
  431.     resultType=None, 
  432.     argTypes=(constants.GLuint, constants.GLsizei, arrays.GLushortArray,),
  433.     doc = 'glVertexAttribs3hvNV( GLuint(index), GLsizei(n), GLushortArray(v) ) -> None',
  434.     argNames = ('index', 'n', 'v',),
  435. )
  436.  
  437. glVertexAttribs4hvNV = platform.createExtensionFunction( 
  438.     'glVertexAttribs4hvNV', dll=platform.GL,
  439.     extension=EXTENSION_NAME,
  440.     resultType=None, 
  441.     argTypes=(constants.GLuint, constants.GLsizei, arrays.GLushortArray,),
  442.     doc = 'glVertexAttribs4hvNV( GLuint(index), GLsizei(n), GLushortArray(v) ) -> None',
  443.     argNames = ('index', 'n', 'v',),
  444. )
  445.  
  446.  
  447. def glInitHalfFloatNV():
  448.     '''Return boolean indicating whether this extension is available'''
  449.     return extensions.hasGLExtension( EXTENSION_NAME )
  450.