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 / packed_pixels.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  1.5 KB  |  34 lines

  1. '''OpenGL extension EXT.packed_pixels
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension provides support for packed pixels in host memory.  A
  6.     packed pixel is represented entirely by one unsigned byte, one
  7.     unsigned short, or one unsigned integer.  The fields with the packed
  8.     pixel are not proper machine types, but the pixel as a whole is.  Thus
  9.     the pixel storage modes, including PACK_SKIP_PIXELS, PACK_ROW_LENGTH,
  10.     PACK_SKIP_ROWS, PACK_IMAGE_HEIGHT_EXT, PACK_SKIP_IMAGES_EXT,
  11.     PACK_SWAP_BYTES, PACK_ALIGNMENT, and their unpacking counterparts all
  12.     work correctly with packed pixels.
  13.  
  14. The official definition of this extension is available here:
  15.     http://oss.sgi.com/projects/ogl-sample/registry/EXT/packed_pixels.txt
  16.  
  17. Automatically generated by the get_gl_extensions script, do not edit!
  18. '''
  19. from OpenGL import platform, constants, constant, arrays
  20. from OpenGL import extensions
  21. from OpenGL.GL import glget
  22. import ctypes
  23. EXTENSION_NAME = 'GL_EXT_packed_pixels'
  24. GL_UNSIGNED_BYTE_3_3_2_EXT = constant.Constant( 'GL_UNSIGNED_BYTE_3_3_2_EXT', 0x8032 )
  25. GL_UNSIGNED_SHORT_4_4_4_4_EXT = constant.Constant( 'GL_UNSIGNED_SHORT_4_4_4_4_EXT', 0x8033 )
  26. GL_UNSIGNED_SHORT_5_5_5_1_EXT = constant.Constant( 'GL_UNSIGNED_SHORT_5_5_5_1_EXT', 0x8034 )
  27. GL_UNSIGNED_INT_8_8_8_8_EXT = constant.Constant( 'GL_UNSIGNED_INT_8_8_8_8_EXT', 0x8035 )
  28. GL_UNSIGNED_INT_10_10_10_2_EXT = constant.Constant( 'GL_UNSIGNED_INT_10_10_10_2_EXT', 0x8036 )
  29.  
  30.  
  31. def glInitPackedPixelsEXT():
  32.     '''Return boolean indicating whether this extension is available'''
  33.     return extensions.hasGLExtension( EXTENSION_NAME )
  34.