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 / fragment_program2.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  2.2 KB  |  57 lines

  1. '''OpenGL extension NV.fragment_program2
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension, like the NV_fragment_program_option extension, provides
  6.     additional fragment program functionality to extend the standard
  7.     ARB_fragment_program language and execution environment.  ARB programs
  8.     wishing to use this added functionality need only add:
  9.     
  10.         OPTION NV_fragment_program2;
  11.     
  12.     to the beginning of their fragment programs.
  13.     
  14.     New functionality provided by this extension, above and beyond that
  15.     already provided by the NV_fragment_program_option extension, includes:
  16.     
  17.     
  18.       * structured branching support, including data-dependent IF tests, loops
  19.         supporting a fixed number of iterations, and a data-dependent loop
  20.         exit instruction (BRK),
  21.     
  22.       * subroutine calls,
  23.     
  24.       * instructions to perform vector normalization, divide vector components
  25.         by a scalar, and perform two-component dot products (with or without a
  26.         scalar add),
  27.     
  28.       * an instruction to perform a texture lookup with an explicit LOD,
  29.     
  30.       * a loop index register for indirect access into the texture coordinate
  31.         attribute array, and
  32.     
  33.       * a facing attribute that indicates whether the fragment is generated
  34.         from a front- or back-facing primitive.
  35.     
  36.  
  37. The official definition of this extension is available here:
  38.     http://oss.sgi.com/projects/ogl-sample/registry/NV/fragment_program2.txt
  39.  
  40. Automatically generated by the get_gl_extensions script, do not edit!
  41. '''
  42. from OpenGL import platform, constants, constant, arrays
  43. from OpenGL import extensions
  44. from OpenGL.GL import glget
  45. import ctypes
  46. EXTENSION_NAME = 'GL_NV_fragment_program2'
  47. GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = constant.Constant( 'GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV', 0x88F4 )
  48. GL_MAX_PROGRAM_CALL_DEPTH_NV = constant.Constant( 'GL_MAX_PROGRAM_CALL_DEPTH_NV', 0x88F5 )
  49. GL_MAX_PROGRAM_IF_DEPTH_NV = constant.Constant( 'GL_MAX_PROGRAM_IF_DEPTH_NV', 0x88F6 )
  50. GL_MAX_PROGRAM_LOOP_DEPTH_NV = constant.Constant( 'GL_MAX_PROGRAM_LOOP_DEPTH_NV', 0x88F7 )
  51. GL_MAX_PROGRAM_LOOP_COUNT_NV = constant.Constant( 'GL_MAX_PROGRAM_LOOP_COUNT_NV', 0x88F8 )
  52.  
  53.  
  54. def glInitFragmentProgram2NV():
  55.     '''Return boolean indicating whether this extension is available'''
  56.     return extensions.hasGLExtension( EXTENSION_NAME )
  57.