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 / framezoom.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  2.1 KB  |  53 lines

  1. '''OpenGL extension SGIX.framezoom
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension provides a additional way to rasterize geometric
  6.     primitives and pixel rectangles.  The techique is to reduce the
  7.     number of pixels rasterized  and (possibly) the number of depth and
  8.     stencil operations performed per primitive.  Each pixel is zoomed
  9.     up and used to render an N x N block of screen pixels.  The
  10.     implementation is free to choose the number of stencil and z pixels
  11.     that will correspond to each N x N block.
  12.     
  13.     This extension provides an opportunity to the implementation to
  14.     perform expensive raster operations at a reduced resolution,
  15.     increasing performance.  Such operations may include
  16.     texture-mapping, depth & stencil tests, etc.  The hardware should
  17.     be allowed to perform operations that it accelerates at full
  18.     hardware speed.
  19.     
  20.     The visual result will be the same as if a scene were rendered into
  21.     a small window, and then that buffer was copied and zoomed up into
  22.     a large window.
  23.     
  24.     All OpenGL parameters that effect rasterization size will implicitly
  25.     be multipled by N (this includes point size, line width, etc).
  26.  
  27. The official definition of this extension is available here:
  28.     http://oss.sgi.com/projects/ogl-sample/registry/SGIX/framezoom.txt
  29.  
  30. Automatically generated by the get_gl_extensions script, do not edit!
  31. '''
  32. from OpenGL import platform, constants, constant, arrays
  33. from OpenGL import extensions
  34. from OpenGL.GL import glget
  35. import ctypes
  36. EXTENSION_NAME = 'GL_SGIX_framezoom'
  37. GL_FRAMEZOOM_SGIX = constant.Constant( 'GL_FRAMEZOOM_SGIX', 0x818B )
  38. GL_FRAMEZOOM_FACTOR_SGIX = constant.Constant( 'GL_FRAMEZOOM_FACTOR_SGIX', 0x818C )
  39. GL_MAX_FRAMEZOOM_FACTOR_SGIX = constant.Constant( 'GL_MAX_FRAMEZOOM_FACTOR_SGIX', 0x818D )
  40. glFrameZoomSGIX = platform.createExtensionFunction( 
  41.     'glFrameZoomSGIX', dll=platform.GL,
  42.     extension=EXTENSION_NAME,
  43.     resultType=None, 
  44.     argTypes=(constants.GLint,),
  45.     doc = 'glFrameZoomSGIX( GLint(factor) ) -> None',
  46.     argNames = ('factor',),
  47. )
  48.  
  49.  
  50. def glInitFramezoomSGIX():
  51.     '''Return boolean indicating whether this extension is available'''
  52.     return extensions.hasGLExtension( EXTENSION_NAME )
  53.