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 / subsample.py < prev   
Encoding:
Python Source  |  2008-12-07  |  2.0 KB  |  47 lines

  1. '''OpenGL extension OML.subsample
  2.  
  3. Overview (from the spec)
  4.     
  5.     Many video image formats and compression techniques utilize various
  6.     component subsamplings, so it is necessary to provide a mechanism to
  7.     specify the up- and down-sampling of components as pixel data is
  8.     drawn from and read back to the client. Though subsampled components
  9.     are normally associated with the video color space, YCrCb, use of
  10.     subsampling in OpenGL does not imply a specific color space. Color
  11.     space conversion may be performed using other extensions or core
  12.     capabilities such as the color matrix.
  13.     
  14.     This extension defines two new pixel storage formats representing
  15.     subsampled data on the client. It is loosely based on the
  16.     SGIX_subsample extension, but specifies subsampling with the data
  17.     format parameter rather than pixel packing parameters. It also
  18.     adds support for CYA subsampled data.
  19.     
  20.     When pixel data is received from the client and an unpacking
  21.     upsampling mode other than PIXEL_SUBSAMPLE_NONE_OML is specified,
  22.     upsampling is performed via replication, unless otherwise specified
  23.     by UNPACK_RESAMPLE_OML.
  24.     
  25.     Similarly, when pixel data is read back to the client and a packing
  26.     downsampling mode other than PIXEL_SUBSAMPLE_NONE_OML is specified,
  27.     downsampling is performed via simple component decimation (point
  28.     sampling), unless otherwise specified by PACK_RESAMPLE_OML.
  29.  
  30. The official definition of this extension is available here:
  31.     http://oss.sgi.com/projects/ogl-sample/registry/OML/subsample.txt
  32.  
  33. Automatically generated by the get_gl_extensions script, do not edit!
  34. '''
  35. from OpenGL import platform, constants, constant, arrays
  36. from OpenGL import extensions
  37. from OpenGL.GL import glget
  38. import ctypes
  39. EXTENSION_NAME = 'GL_OML_subsample'
  40. GL_FORMAT_SUBSAMPLE_24_24_OML = constant.Constant( 'GL_FORMAT_SUBSAMPLE_24_24_OML', 0x8982 )
  41. GL_FORMAT_SUBSAMPLE_244_244_OML = constant.Constant( 'GL_FORMAT_SUBSAMPLE_244_244_OML', 0x8983 )
  42.  
  43.  
  44. def glInitSubsampleOML():
  45.     '''Return boolean indicating whether this extension is available'''
  46.     return extensions.hasGLExtension( EXTENSION_NAME )
  47.