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 / convolution.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  9.1 KB  |  177 lines

  1. '''OpenGL extension EXT.convolution
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension defines 1 and 2 dimensional convolution operations
  6.     at a fixed location in the pixel transfer process.  Thus pixel drawing,
  7.     reading, and copying, as well as texture image definition, are all
  8.     candidates for convolution.  The convolution kernels are themselves
  9.     treated as 1 and 2 dimensional images, which can be loaded from
  10.     application memory or from the framebuffer.
  11.     
  12.     This extension is designed to accommodate 3D convolution, but the
  13.     API is left for a future extension.
  14.  
  15. The official definition of this extension is available here:
  16.     http://oss.sgi.com/projects/ogl-sample/registry/EXT/convolution.txt
  17.  
  18. Automatically generated by the get_gl_extensions script, do not edit!
  19. '''
  20. from OpenGL import platform, constants, constant, arrays
  21. from OpenGL import extensions
  22. from OpenGL.GL import glget
  23. import ctypes
  24. EXTENSION_NAME = 'GL_EXT_convolution'
  25. GL_CONVOLUTION_1D_EXT = constant.Constant( 'GL_CONVOLUTION_1D_EXT', 0x8010 )
  26. glget.addGLGetConstant( GL_CONVOLUTION_1D_EXT, (1,) )
  27. GL_CONVOLUTION_2D_EXT = constant.Constant( 'GL_CONVOLUTION_2D_EXT', 0x8011 )
  28. glget.addGLGetConstant( GL_CONVOLUTION_2D_EXT, (1,) )
  29. GL_SEPARABLE_2D_EXT = constant.Constant( 'GL_SEPARABLE_2D_EXT', 0x8012 )
  30. glget.addGLGetConstant( GL_SEPARABLE_2D_EXT, (1,) )
  31. GL_CONVOLUTION_BORDER_MODE_EXT = constant.Constant( 'GL_CONVOLUTION_BORDER_MODE_EXT', 0x8013 )
  32. GL_CONVOLUTION_FILTER_SCALE_EXT = constant.Constant( 'GL_CONVOLUTION_FILTER_SCALE_EXT', 0x8014 )
  33. GL_CONVOLUTION_FILTER_BIAS_EXT = constant.Constant( 'GL_CONVOLUTION_FILTER_BIAS_EXT', 0x8015 )
  34. GL_REDUCE_EXT = constant.Constant( 'GL_REDUCE_EXT', 0x8016 )
  35. GL_CONVOLUTION_FORMAT_EXT = constant.Constant( 'GL_CONVOLUTION_FORMAT_EXT', 0x8017 )
  36. GL_CONVOLUTION_WIDTH_EXT = constant.Constant( 'GL_CONVOLUTION_WIDTH_EXT', 0x8018 )
  37. GL_CONVOLUTION_HEIGHT_EXT = constant.Constant( 'GL_CONVOLUTION_HEIGHT_EXT', 0x8019 )
  38. GL_MAX_CONVOLUTION_WIDTH_EXT = constant.Constant( 'GL_MAX_CONVOLUTION_WIDTH_EXT', 0x801A )
  39. GL_MAX_CONVOLUTION_HEIGHT_EXT = constant.Constant( 'GL_MAX_CONVOLUTION_HEIGHT_EXT', 0x801B )
  40. GL_POST_CONVOLUTION_RED_SCALE_EXT = constant.Constant( 'GL_POST_CONVOLUTION_RED_SCALE_EXT', 0x801C )
  41. glget.addGLGetConstant( GL_POST_CONVOLUTION_RED_SCALE_EXT, (1,) )
  42. GL_POST_CONVOLUTION_GREEN_SCALE_EXT = constant.Constant( 'GL_POST_CONVOLUTION_GREEN_SCALE_EXT', 0x801D )
  43. glget.addGLGetConstant( GL_POST_CONVOLUTION_GREEN_SCALE_EXT, (1,) )
  44. GL_POST_CONVOLUTION_BLUE_SCALE_EXT = constant.Constant( 'GL_POST_CONVOLUTION_BLUE_SCALE_EXT', 0x801E )
  45. glget.addGLGetConstant( GL_POST_CONVOLUTION_BLUE_SCALE_EXT, (1,) )
  46. GL_POST_CONVOLUTION_ALPHA_SCALE_EXT = constant.Constant( 'GL_POST_CONVOLUTION_ALPHA_SCALE_EXT', 0x801F )
  47. glget.addGLGetConstant( GL_POST_CONVOLUTION_ALPHA_SCALE_EXT, (1,) )
  48. GL_POST_CONVOLUTION_RED_BIAS_EXT = constant.Constant( 'GL_POST_CONVOLUTION_RED_BIAS_EXT', 0x8020 )
  49. glget.addGLGetConstant( GL_POST_CONVOLUTION_RED_BIAS_EXT, (1,) )
  50. GL_POST_CONVOLUTION_GREEN_BIAS_EXT = constant.Constant( 'GL_POST_CONVOLUTION_GREEN_BIAS_EXT', 0x8021 )
  51. glget.addGLGetConstant( GL_POST_CONVOLUTION_GREEN_BIAS_EXT, (1,) )
  52. GL_POST_CONVOLUTION_BLUE_BIAS_EXT = constant.Constant( 'GL_POST_CONVOLUTION_BLUE_BIAS_EXT', 0x8022 )
  53. glget.addGLGetConstant( GL_POST_CONVOLUTION_BLUE_BIAS_EXT, (1,) )
  54. GL_POST_CONVOLUTION_ALPHA_BIAS_EXT = constant.Constant( 'GL_POST_CONVOLUTION_ALPHA_BIAS_EXT', 0x8023 )
  55. glget.addGLGetConstant( GL_POST_CONVOLUTION_ALPHA_BIAS_EXT, (1,) )
  56. glConvolutionFilter1DEXT = platform.createExtensionFunction( 
  57.     'glConvolutionFilter1DEXT', dll=platform.GL,
  58.     extension=EXTENSION_NAME,
  59.     resultType=None, 
  60.     argTypes=(constants.GLenum, constants.GLenum, constants.GLsizei, constants.GLenum, constants.GLenum, ctypes.c_void_p,),
  61.     doc = 'glConvolutionFilter1DEXT( GLenum(target), GLenum(internalformat), GLsizei(width), GLenum(format), GLenum(type), c_void_p(image) ) -> None',
  62.     argNames = ('target', 'internalformat', 'width', 'format', 'type', 'image',),
  63. )
  64.  
  65. glConvolutionFilter2DEXT = platform.createExtensionFunction( 
  66.     'glConvolutionFilter2DEXT', dll=platform.GL,
  67.     extension=EXTENSION_NAME,
  68.     resultType=None, 
  69.     argTypes=(constants.GLenum, constants.GLenum, constants.GLsizei, constants.GLsizei, constants.GLenum, constants.GLenum, ctypes.c_void_p,),
  70.     doc = 'glConvolutionFilter2DEXT( GLenum(target), GLenum(internalformat), GLsizei(width), GLsizei(height), GLenum(format), GLenum(type), c_void_p(image) ) -> None',
  71.     argNames = ('target', 'internalformat', 'width', 'height', 'format', 'type', 'image',),
  72. )
  73.  
  74. glConvolutionParameterfEXT = platform.createExtensionFunction( 
  75.     'glConvolutionParameterfEXT', dll=platform.GL,
  76.     extension=EXTENSION_NAME,
  77.     resultType=None, 
  78.     argTypes=(constants.GLenum, constants.GLenum, constants.GLfloat,),
  79.     doc = 'glConvolutionParameterfEXT( GLenum(target), GLenum(pname), GLfloat(params) ) -> None',
  80.     argNames = ('target', 'pname', 'params',),
  81. )
  82.  
  83. glConvolutionParameterfvEXT = platform.createExtensionFunction( 
  84.     'glConvolutionParameterfvEXT', dll=platform.GL,
  85.     extension=EXTENSION_NAME,
  86.     resultType=None, 
  87.     argTypes=(constants.GLenum, constants.GLenum, arrays.GLfloatArray,),
  88.     doc = 'glConvolutionParameterfvEXT( GLenum(target), GLenum(pname), GLfloatArray(params) ) -> None',
  89.     argNames = ('target', 'pname', 'params',),
  90. )
  91.  
  92. glConvolutionParameteriEXT = platform.createExtensionFunction( 
  93.     'glConvolutionParameteriEXT', dll=platform.GL,
  94.     extension=EXTENSION_NAME,
  95.     resultType=None, 
  96.     argTypes=(constants.GLenum, constants.GLenum, constants.GLint,),
  97.     doc = 'glConvolutionParameteriEXT( GLenum(target), GLenum(pname), GLint(params) ) -> None',
  98.     argNames = ('target', 'pname', 'params',),
  99. )
  100.  
  101. glConvolutionParameterivEXT = platform.createExtensionFunction( 
  102.     'glConvolutionParameterivEXT', dll=platform.GL,
  103.     extension=EXTENSION_NAME,
  104.     resultType=None, 
  105.     argTypes=(constants.GLenum, constants.GLenum, arrays.GLintArray,),
  106.     doc = 'glConvolutionParameterivEXT( GLenum(target), GLenum(pname), GLintArray(params) ) -> None',
  107.     argNames = ('target', 'pname', 'params',),
  108. )
  109.  
  110. glCopyConvolutionFilter1DEXT = platform.createExtensionFunction( 
  111.     'glCopyConvolutionFilter1DEXT', dll=platform.GL,
  112.     extension=EXTENSION_NAME,
  113.     resultType=None, 
  114.     argTypes=(constants.GLenum, constants.GLenum, constants.GLint, constants.GLint, constants.GLsizei,),
  115.     doc = 'glCopyConvolutionFilter1DEXT( GLenum(target), GLenum(internalformat), GLint(x), GLint(y), GLsizei(width) ) -> None',
  116.     argNames = ('target', 'internalformat', 'x', 'y', 'width',),
  117. )
  118.  
  119. glCopyConvolutionFilter2DEXT = platform.createExtensionFunction( 
  120.     'glCopyConvolutionFilter2DEXT', dll=platform.GL,
  121.     extension=EXTENSION_NAME,
  122.     resultType=None, 
  123.     argTypes=(constants.GLenum, constants.GLenum, constants.GLint, constants.GLint, constants.GLsizei, constants.GLsizei,),
  124.     doc = 'glCopyConvolutionFilter2DEXT( GLenum(target), GLenum(internalformat), GLint(x), GLint(y), GLsizei(width), GLsizei(height) ) -> None',
  125.     argNames = ('target', 'internalformat', 'x', 'y', 'width', 'height',),
  126. )
  127.  
  128. glGetConvolutionFilterEXT = platform.createExtensionFunction( 
  129.     'glGetConvolutionFilterEXT', dll=platform.GL,
  130.     extension=EXTENSION_NAME,
  131.     resultType=None, 
  132.     argTypes=(constants.GLenum, constants.GLenum, constants.GLenum, ctypes.c_void_p,),
  133.     doc = 'glGetConvolutionFilterEXT( GLenum(target), GLenum(format), GLenum(type), c_void_p(image) ) -> None',
  134.     argNames = ('target', 'format', 'type', 'image',),
  135. )
  136.  
  137. glGetConvolutionParameterfvEXT = platform.createExtensionFunction( 
  138.     'glGetConvolutionParameterfvEXT', dll=platform.GL,
  139.     extension=EXTENSION_NAME,
  140.     resultType=None, 
  141.     argTypes=(constants.GLenum, constants.GLenum, arrays.GLfloatArray,),
  142.     doc = 'glGetConvolutionParameterfvEXT( GLenum(target), GLenum(pname), GLfloatArray(params) ) -> None',
  143.     argNames = ('target', 'pname', 'params',),
  144. )
  145.  
  146. glGetConvolutionParameterivEXT = platform.createExtensionFunction( 
  147.     'glGetConvolutionParameterivEXT', dll=platform.GL,
  148.     extension=EXTENSION_NAME,
  149.     resultType=None, 
  150.     argTypes=(constants.GLenum, constants.GLenum, arrays.GLintArray,),
  151.     doc = 'glGetConvolutionParameterivEXT( GLenum(target), GLenum(pname), GLintArray(params) ) -> None',
  152.     argNames = ('target', 'pname', 'params',),
  153. )
  154.  
  155. glGetSeparableFilterEXT = platform.createExtensionFunction( 
  156.     'glGetSeparableFilterEXT', dll=platform.GL,
  157.     extension=EXTENSION_NAME,
  158.     resultType=None, 
  159.     argTypes=(constants.GLenum, constants.GLenum, constants.GLenum, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p,),
  160.     doc = 'glGetSeparableFilterEXT( GLenum(target), GLenum(format), GLenum(type), c_void_p(row), c_void_p(column), c_void_p(span) ) -> None',
  161.     argNames = ('target', 'format', 'type', 'row', 'column', 'span',),
  162. )
  163.  
  164. glSeparableFilter2DEXT = platform.createExtensionFunction( 
  165.     'glSeparableFilter2DEXT', dll=platform.GL,
  166.     extension=EXTENSION_NAME,
  167.     resultType=None, 
  168.     argTypes=(constants.GLenum, constants.GLenum, constants.GLsizei, constants.GLsizei, constants.GLenum, constants.GLenum, ctypes.c_void_p, ctypes.c_void_p,),
  169.     doc = 'glSeparableFilter2DEXT( GLenum(target), GLenum(internalformat), GLsizei(width), GLsizei(height), GLenum(format), GLenum(type), c_void_p(row), c_void_p(column) ) -> None',
  170.     argNames = ('target', 'internalformat', 'width', 'height', 'format', 'type', 'row', 'column',),
  171. )
  172.  
  173.  
  174. def glInitConvolutionEXT():
  175.     '''Return boolean indicating whether this extension is available'''
  176.     return extensions.hasGLExtension( EXTENSION_NAME )
  177.