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

  1. '''OpenGL extension SGIX.resample
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension enhances the unpacking resampling capabilities
  6.     of the SGIX_subsample extension.
  7.     
  8.     When pixel data is received from the client and an unpacking
  9.     upsampling mode other than PIXEL_SUBSAMPLE_RATE_4444_SGIX is
  10.     specified, the upsampling is performed via one of two methods:
  11.     RESAMPLE_REPLICATE_SGIX, RESAMPLE_ZERO_FILL_SGIX.
  12.     Replicate and zero fill are provided to
  13.     give the application greatest performance and control over the
  14.     filtering process.
  15.     
  16.     However, when pixel data is read back to the client and a
  17.     packing downsampling mode other than PIXEL_SUBSAMPLE_RATE_4444_SGIX
  18.     is specified, downsampling is
  19.     performed via simple component decimation (point sampling). That is,
  20.     only the RESAMPLE_DECIMATE_SGIX is valid.
  21.     
  22.  
  23. The official definition of this extension is available here:
  24.     http://oss.sgi.com/projects/ogl-sample/registry/SGIX/resample.txt
  25.  
  26. Automatically generated by the get_gl_extensions script, do not edit!
  27. '''
  28. from OpenGL import platform, constants, constant, arrays
  29. from OpenGL import extensions
  30. from OpenGL.GL import glget
  31. import ctypes
  32. EXTENSION_NAME = 'GL_SGIX_resample'
  33. GL_PACK_RESAMPLE_SGIX = constant.Constant( 'GL_PACK_RESAMPLE_SGIX', 0x842C )
  34. glget.addGLGetConstant( GL_PACK_RESAMPLE_SGIX, (1,) )
  35. GL_UNPACK_RESAMPLE_SGIX = constant.Constant( 'GL_UNPACK_RESAMPLE_SGIX', 0x842D )
  36. glget.addGLGetConstant( GL_UNPACK_RESAMPLE_SGIX, (1,) )
  37. GL_RESAMPLE_REPLICATE_SGIX = constant.Constant( 'GL_RESAMPLE_REPLICATE_SGIX', 0x842E )
  38. GL_RESAMPLE_ZERO_FILL_SGIX = constant.Constant( 'GL_RESAMPLE_ZERO_FILL_SGIX', 0x842F )
  39. GL_RESAMPLE_DECIMATE_SGIX = constant.Constant( 'GL_RESAMPLE_DECIMATE_SGIX', 0x8430 )
  40.  
  41.  
  42. def glInitResampleSGIX():
  43.     '''Return boolean indicating whether this extension is available'''
  44.     return extensions.hasGLExtension( EXTENSION_NAME )
  45.