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 / NV / register_combiners2.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  2.8 KB  |  66 lines

  1. '''OpenGL extension NV.register_combiners2
  2.  
  3. Overview (from the spec)
  4.     
  5.     The NV_register_combiners extension provides a powerful fragment
  6.     coloring mechanism.  This specification extends the register combiners
  7.     functionality to support more color constant values that are unique
  8.     for each general combiner stage.
  9.     
  10.     The base register combiners functionality supports only two color
  11.     constants.  These two constants are available in every general
  12.     combiner stage and in the final combiner.
  13.     
  14.     When many general combiner stages are supported, more than two
  15.     unique color constants is often required.  The obvious way to extend
  16.     the register combiners is to add several more color constant
  17.     registers.  But adding new unique color constant registers is
  18.     expensive for hardware implementation because every color constant
  19.     register must be available as an input to any stage.
  20.     
  21.     In practice however, it is the total set of general combiner stages
  22.     that requires more color constants, not each and every individual
  23.     general combiner stage.  Each individual general combiner stage
  24.     typically requires only one or two color constants.
  25.     
  26.     By keeping two color constant registers but making these two registers
  27.     contain two unique color constant values for each general combiner
  28.     stage, the hardware expense of supporting multiple color constants
  29.     is minimized.  Additionally, this scheme scales appropriately as
  30.     more general combiner stages are added.
  31.  
  32. The official definition of this extension is available here:
  33.     http://oss.sgi.com/projects/ogl-sample/registry/NV/register_combiners2.txt
  34.  
  35. Automatically generated by the get_gl_extensions script, do not edit!
  36. '''
  37. from OpenGL import platform, constants, constant, arrays
  38. from OpenGL import extensions
  39. from OpenGL.GL import glget
  40. import ctypes
  41. EXTENSION_NAME = 'GL_NV_register_combiners2'
  42. GL_PER_STAGE_CONSTANTS_NV = constant.Constant( 'GL_PER_STAGE_CONSTANTS_NV', 0x8535 )
  43. glget.addGLGetConstant( GL_PER_STAGE_CONSTANTS_NV, (1,) )
  44. glCombinerStageParameterfvNV = platform.createExtensionFunction( 
  45.     'glCombinerStageParameterfvNV', dll=platform.GL,
  46.     extension=EXTENSION_NAME,
  47.     resultType=None, 
  48.     argTypes=(constants.GLenum, constants.GLenum, arrays.GLfloatArray,),
  49.     doc = 'glCombinerStageParameterfvNV( GLenum(stage), GLenum(pname), GLfloatArray(params) ) -> None',
  50.     argNames = ('stage', 'pname', 'params',),
  51. )
  52.  
  53. glGetCombinerStageParameterfvNV = platform.createExtensionFunction( 
  54.     'glGetCombinerStageParameterfvNV', dll=platform.GL,
  55.     extension=EXTENSION_NAME,
  56.     resultType=None, 
  57.     argTypes=(constants.GLenum, constants.GLenum, arrays.GLfloatArray,),
  58.     doc = 'glGetCombinerStageParameterfvNV( GLenum(stage), GLenum(pname), GLfloatArray(params) ) -> None',
  59.     argNames = ('stage', 'pname', 'params',),
  60. )
  61.  
  62.  
  63. def glInitRegisterCombiners2NV():
  64.     '''Return boolean indicating whether this extension is available'''
  65.     return extensions.hasGLExtension( EXTENSION_NAME )
  66.