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 / OML / resample.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  1.9 KB  |  45 lines

  1. '''OpenGL extension OML.resample
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension enhances the resampling capabilities of the
  6.     OML_subsample extension. It is loosely based on the SGIX_resample
  7.     extension.
  8.     
  9.     When converting data from subsampled to uniform sampling, upsampling
  10.     may be performed by one of three methods: component replication,
  11.     zero fill, or adjacent neighbor averaging.
  12.     
  13.     When converting data from uniform sampling to subsampled form,
  14.     downsampling may be performed only by component decimation (point
  15.     sampling) or averaging.
  16.     
  17.     Upsampling and downsampling filters other than those defined by this
  18.     extension may be performed by appropriate use of convolution and
  19.     other pixel transfer operations. The zero fill unpacking mode is
  20.     included to assist applications wanting to define their own filters.
  21.  
  22. The official definition of this extension is available here:
  23.     http://oss.sgi.com/projects/ogl-sample/registry/OML/resample.txt
  24.  
  25. Automatically generated by the get_gl_extensions script, do not edit!
  26. '''
  27. from OpenGL import platform, constants, constant, arrays
  28. from OpenGL import extensions
  29. from OpenGL.GL import glget
  30. import ctypes
  31. EXTENSION_NAME = 'GL_OML_resample'
  32. GL_PACK_RESAMPLE_OML = constant.Constant( 'GL_PACK_RESAMPLE_OML', 0x8984 )
  33. glget.addGLGetConstant( GL_PACK_RESAMPLE_OML, (1,) )
  34. GL_UNPACK_RESAMPLE_OML = constant.Constant( 'GL_UNPACK_RESAMPLE_OML', 0x8985 )
  35. glget.addGLGetConstant( GL_UNPACK_RESAMPLE_OML, (1,) )
  36. GL_RESAMPLE_REPLICATE_OML = constant.Constant( 'GL_RESAMPLE_REPLICATE_OML', 0x8986 )
  37. GL_RESAMPLE_ZERO_FILL_OML = constant.Constant( 'GL_RESAMPLE_ZERO_FILL_OML', 0x8987 )
  38. GL_RESAMPLE_AVERAGE_OML = constant.Constant( 'GL_RESAMPLE_AVERAGE_OML', 0x8988 )
  39. GL_RESAMPLE_DECIMATE_OML = constant.Constant( 'GL_RESAMPLE_DECIMATE_OML', 0x8989 )
  40.  
  41.  
  42. def glInitResampleOML():
  43.     '''Return boolean indicating whether this extension is available'''
  44.     return extensions.hasGLExtension( EXTENSION_NAME )
  45.