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 / EXT / histogram.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  5.6 KB  |  132 lines

  1. '''OpenGL extension EXT.histogram
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension defines pixel operations that count occurences of
  6.     specific color component values (histogram) and that track the minimum
  7.     and maximum color component values (minmax).  An optional mode allows
  8.     pixel data to be discarded after the histogram and/or minmax operations
  9.     are completed.  Otherwise the pixel data continue on to the next
  10.     operation unaffected.
  11.  
  12. The official definition of this extension is available here:
  13.     http://oss.sgi.com/projects/ogl-sample/registry/EXT/histogram.txt
  14.  
  15. Automatically generated by the get_gl_extensions script, do not edit!
  16. '''
  17. from OpenGL import platform, constants, constant, arrays
  18. from OpenGL import extensions
  19. from OpenGL.GL import glget
  20. import ctypes
  21. EXTENSION_NAME = 'GL_EXT_histogram'
  22. GL_HISTOGRAM_EXT = constant.Constant( 'GL_HISTOGRAM_EXT', 0x8024 )
  23. glget.addGLGetConstant( GL_HISTOGRAM_EXT, (1,) )
  24. GL_PROXY_HISTOGRAM_EXT = constant.Constant( 'GL_PROXY_HISTOGRAM_EXT', 0x8025 )
  25. GL_HISTOGRAM_WIDTH_EXT = constant.Constant( 'GL_HISTOGRAM_WIDTH_EXT', 0x8026 )
  26. GL_HISTOGRAM_FORMAT_EXT = constant.Constant( 'GL_HISTOGRAM_FORMAT_EXT', 0x8027 )
  27. GL_HISTOGRAM_RED_SIZE_EXT = constant.Constant( 'GL_HISTOGRAM_RED_SIZE_EXT', 0x8028 )
  28. GL_HISTOGRAM_GREEN_SIZE_EXT = constant.Constant( 'GL_HISTOGRAM_GREEN_SIZE_EXT', 0x8029 )
  29. GL_HISTOGRAM_BLUE_SIZE_EXT = constant.Constant( 'GL_HISTOGRAM_BLUE_SIZE_EXT', 0x802A )
  30. GL_HISTOGRAM_ALPHA_SIZE_EXT = constant.Constant( 'GL_HISTOGRAM_ALPHA_SIZE_EXT', 0x802B )
  31. GL_HISTOGRAM_LUMINANCE_SIZE_EXT = constant.Constant( 'GL_HISTOGRAM_LUMINANCE_SIZE_EXT', 0x802C )
  32. GL_HISTOGRAM_SINK_EXT = constant.Constant( 'GL_HISTOGRAM_SINK_EXT', 0x802D )
  33. GL_MINMAX_EXT = constant.Constant( 'GL_MINMAX_EXT', 0x802E )
  34. glget.addGLGetConstant( GL_MINMAX_EXT, (1,) )
  35. GL_MINMAX_FORMAT_EXT = constant.Constant( 'GL_MINMAX_FORMAT_EXT', 0x802F )
  36. GL_MINMAX_SINK_EXT = constant.Constant( 'GL_MINMAX_SINK_EXT', 0x8030 )
  37. GL_TABLE_TOO_LARGE_EXT = constant.Constant( 'GL_TABLE_TOO_LARGE_EXT', 0x8031 )
  38. glGetHistogramEXT = platform.createExtensionFunction( 
  39.     'glGetHistogramEXT', dll=platform.GL,
  40.     extension=EXTENSION_NAME,
  41.     resultType=None, 
  42.     argTypes=(constants.GLenum, constants.GLboolean, constants.GLenum, constants.GLenum, ctypes.c_void_p,),
  43.     doc = 'glGetHistogramEXT( GLenum(target), GLboolean(reset), GLenum(format), GLenum(type), c_void_p(values) ) -> None',
  44.     argNames = ('target', 'reset', 'format', 'type', 'values',),
  45. )
  46.  
  47. glGetHistogramParameterfvEXT = platform.createExtensionFunction( 
  48.     'glGetHistogramParameterfvEXT', dll=platform.GL,
  49.     extension=EXTENSION_NAME,
  50.     resultType=None, 
  51.     argTypes=(constants.GLenum, constants.GLenum, arrays.GLfloatArray,),
  52.     doc = 'glGetHistogramParameterfvEXT( GLenum(target), GLenum(pname), GLfloatArray(params) ) -> None',
  53.     argNames = ('target', 'pname', 'params',),
  54. )
  55.  
  56. glGetHistogramParameterivEXT = platform.createExtensionFunction( 
  57.     'glGetHistogramParameterivEXT', dll=platform.GL,
  58.     extension=EXTENSION_NAME,
  59.     resultType=None, 
  60.     argTypes=(constants.GLenum, constants.GLenum, arrays.GLintArray,),
  61.     doc = 'glGetHistogramParameterivEXT( GLenum(target), GLenum(pname), GLintArray(params) ) -> None',
  62.     argNames = ('target', 'pname', 'params',),
  63. )
  64.  
  65. glGetMinmaxEXT = platform.createExtensionFunction( 
  66.     'glGetMinmaxEXT', dll=platform.GL,
  67.     extension=EXTENSION_NAME,
  68.     resultType=None, 
  69.     argTypes=(constants.GLenum, constants.GLboolean, constants.GLenum, constants.GLenum, ctypes.c_void_p,),
  70.     doc = 'glGetMinmaxEXT( GLenum(target), GLboolean(reset), GLenum(format), GLenum(type), c_void_p(values) ) -> None',
  71.     argNames = ('target', 'reset', 'format', 'type', 'values',),
  72. )
  73.  
  74. glGetMinmaxParameterfvEXT = platform.createExtensionFunction( 
  75.     'glGetMinmaxParameterfvEXT', dll=platform.GL,
  76.     extension=EXTENSION_NAME,
  77.     resultType=None, 
  78.     argTypes=(constants.GLenum, constants.GLenum, arrays.GLfloatArray,),
  79.     doc = 'glGetMinmaxParameterfvEXT( GLenum(target), GLenum(pname), GLfloatArray(params) ) -> None',
  80.     argNames = ('target', 'pname', 'params',),
  81. )
  82.  
  83. glGetMinmaxParameterivEXT = platform.createExtensionFunction( 
  84.     'glGetMinmaxParameterivEXT', dll=platform.GL,
  85.     extension=EXTENSION_NAME,
  86.     resultType=None, 
  87.     argTypes=(constants.GLenum, constants.GLenum, arrays.GLintArray,),
  88.     doc = 'glGetMinmaxParameterivEXT( GLenum(target), GLenum(pname), GLintArray(params) ) -> None',
  89.     argNames = ('target', 'pname', 'params',),
  90. )
  91.  
  92. glHistogramEXT = platform.createExtensionFunction( 
  93.     'glHistogramEXT', dll=platform.GL,
  94.     extension=EXTENSION_NAME,
  95.     resultType=None, 
  96.     argTypes=(constants.GLenum, constants.GLsizei, constants.GLenum, constants.GLboolean,),
  97.     doc = 'glHistogramEXT( GLenum(target), GLsizei(width), GLenum(internalformat), GLboolean(sink) ) -> None',
  98.     argNames = ('target', 'width', 'internalformat', 'sink',),
  99. )
  100.  
  101. glMinmaxEXT = platform.createExtensionFunction( 
  102.     'glMinmaxEXT', dll=platform.GL,
  103.     extension=EXTENSION_NAME,
  104.     resultType=None, 
  105.     argTypes=(constants.GLenum, constants.GLenum, constants.GLboolean,),
  106.     doc = 'glMinmaxEXT( GLenum(target), GLenum(internalformat), GLboolean(sink) ) -> None',
  107.     argNames = ('target', 'internalformat', 'sink',),
  108. )
  109.  
  110. glResetHistogramEXT = platform.createExtensionFunction( 
  111.     'glResetHistogramEXT', dll=platform.GL,
  112.     extension=EXTENSION_NAME,
  113.     resultType=None, 
  114.     argTypes=(constants.GLenum,),
  115.     doc = 'glResetHistogramEXT( GLenum(target) ) -> None',
  116.     argNames = ('target',),
  117. )
  118.  
  119. glResetMinmaxEXT = platform.createExtensionFunction( 
  120.     'glResetMinmaxEXT', dll=platform.GL,
  121.     extension=EXTENSION_NAME,
  122.     resultType=None, 
  123.     argTypes=(constants.GLenum,),
  124.     doc = 'glResetMinmaxEXT( GLenum(target) ) -> None',
  125.     argNames = ('target',),
  126. )
  127.  
  128.  
  129. def glInitHistogramEXT():
  130.     '''Return boolean indicating whether this extension is available'''
  131.     return extensions.hasGLExtension( EXTENSION_NAME )
  132.