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 / ATI / fragment_shader.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  14.0 KB  |  269 lines

  1. '''OpenGL extension ATI.fragment_shader
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension exposes a powerful fragment shading model which
  6.     provides a very general means of expressing fragment color blending
  7.     and dependent texture address modification.  The programming is
  8.     a register-based model in which there is a fixed number of 
  9.     instructions, texture lookups, read/write registers, and constants.
  10.     
  11.     The fragment shader extension provides a unified instruction set
  12.     for operating on address or color data and eliminates the 
  13.     distinction between the two.  This extension provides all the 
  14.     interfaces necessary to fully expose this programmable fragment 
  15.     shader in GL.
  16.     
  17.     Although conceived as a device-independent extension which would 
  18.     expose the capabilities of future generations of hardware, changing 
  19.     trends in programmable hardware have affected the lifespan of this 
  20.     extension.  For this reason you will now find a fixed set of 
  21.     features and resources exposed, and the queries to determine this 
  22.     set have been deprecated.
  23.  
  24. The official definition of this extension is available here:
  25.     http://oss.sgi.com/projects/ogl-sample/registry/ATI/fragment_shader.txt
  26.  
  27. Automatically generated by the get_gl_extensions script, do not edit!
  28. '''
  29. from OpenGL import platform, constants, constant, arrays
  30. from OpenGL import extensions
  31. from OpenGL.GL import glget
  32. import ctypes
  33. EXTENSION_NAME = 'GL_ATI_fragment_shader'
  34. GL_FRAGMENT_SHADER_ATI = constant.Constant( 'GL_FRAGMENT_SHADER_ATI', 0x8920 )
  35. glget.addGLGetConstant( GL_FRAGMENT_SHADER_ATI, (1,) )
  36. GL_REG_0_ATI = constant.Constant( 'GL_REG_0_ATI', 0x8921 )
  37. GL_REG_1_ATI = constant.Constant( 'GL_REG_1_ATI', 0x8922 )
  38. GL_REG_2_ATI = constant.Constant( 'GL_REG_2_ATI', 0x8923 )
  39. GL_REG_3_ATI = constant.Constant( 'GL_REG_3_ATI', 0x8924 )
  40. GL_REG_4_ATI = constant.Constant( 'GL_REG_4_ATI', 0x8925 )
  41. GL_REG_5_ATI = constant.Constant( 'GL_REG_5_ATI', 0x8926 )
  42. GL_REG_6_ATI = constant.Constant( 'GL_REG_6_ATI', 0x8927 )
  43. GL_REG_7_ATI = constant.Constant( 'GL_REG_7_ATI', 0x8928 )
  44. GL_REG_8_ATI = constant.Constant( 'GL_REG_8_ATI', 0x8929 )
  45. GL_REG_9_ATI = constant.Constant( 'GL_REG_9_ATI', 0x892A )
  46. GL_REG_10_ATI = constant.Constant( 'GL_REG_10_ATI', 0x892B )
  47. GL_REG_11_ATI = constant.Constant( 'GL_REG_11_ATI', 0x892C )
  48. GL_REG_12_ATI = constant.Constant( 'GL_REG_12_ATI', 0x892D )
  49. GL_REG_13_ATI = constant.Constant( 'GL_REG_13_ATI', 0x892E )
  50. GL_REG_14_ATI = constant.Constant( 'GL_REG_14_ATI', 0x892F )
  51. GL_REG_15_ATI = constant.Constant( 'GL_REG_15_ATI', 0x8930 )
  52. GL_REG_16_ATI = constant.Constant( 'GL_REG_16_ATI', 0x8931 )
  53. GL_REG_17_ATI = constant.Constant( 'GL_REG_17_ATI', 0x8932 )
  54. GL_REG_18_ATI = constant.Constant( 'GL_REG_18_ATI', 0x8933 )
  55. GL_REG_19_ATI = constant.Constant( 'GL_REG_19_ATI', 0x8934 )
  56. GL_REG_20_ATI = constant.Constant( 'GL_REG_20_ATI', 0x8935 )
  57. GL_REG_21_ATI = constant.Constant( 'GL_REG_21_ATI', 0x8936 )
  58. GL_REG_22_ATI = constant.Constant( 'GL_REG_22_ATI', 0x8937 )
  59. GL_REG_23_ATI = constant.Constant( 'GL_REG_23_ATI', 0x8938 )
  60. GL_REG_24_ATI = constant.Constant( 'GL_REG_24_ATI', 0x8939 )
  61. GL_REG_25_ATI = constant.Constant( 'GL_REG_25_ATI', 0x893A )
  62. GL_REG_26_ATI = constant.Constant( 'GL_REG_26_ATI', 0x893B )
  63. GL_REG_27_ATI = constant.Constant( 'GL_REG_27_ATI', 0x893C )
  64. GL_REG_28_ATI = constant.Constant( 'GL_REG_28_ATI', 0x893D )
  65. GL_REG_29_ATI = constant.Constant( 'GL_REG_29_ATI', 0x893E )
  66. GL_REG_30_ATI = constant.Constant( 'GL_REG_30_ATI', 0x893F )
  67. GL_REG_31_ATI = constant.Constant( 'GL_REG_31_ATI', 0x8940 )
  68. GL_CON_0_ATI = constant.Constant( 'GL_CON_0_ATI', 0x8941 )
  69. GL_CON_1_ATI = constant.Constant( 'GL_CON_1_ATI', 0x8942 )
  70. GL_CON_2_ATI = constant.Constant( 'GL_CON_2_ATI', 0x8943 )
  71. GL_CON_3_ATI = constant.Constant( 'GL_CON_3_ATI', 0x8944 )
  72. GL_CON_4_ATI = constant.Constant( 'GL_CON_4_ATI', 0x8945 )
  73. GL_CON_5_ATI = constant.Constant( 'GL_CON_5_ATI', 0x8946 )
  74. GL_CON_6_ATI = constant.Constant( 'GL_CON_6_ATI', 0x8947 )
  75. GL_CON_7_ATI = constant.Constant( 'GL_CON_7_ATI', 0x8948 )
  76. GL_CON_8_ATI = constant.Constant( 'GL_CON_8_ATI', 0x8949 )
  77. GL_CON_9_ATI = constant.Constant( 'GL_CON_9_ATI', 0x894A )
  78. GL_CON_10_ATI = constant.Constant( 'GL_CON_10_ATI', 0x894B )
  79. GL_CON_11_ATI = constant.Constant( 'GL_CON_11_ATI', 0x894C )
  80. GL_CON_12_ATI = constant.Constant( 'GL_CON_12_ATI', 0x894D )
  81. GL_CON_13_ATI = constant.Constant( 'GL_CON_13_ATI', 0x894E )
  82. GL_CON_14_ATI = constant.Constant( 'GL_CON_14_ATI', 0x894F )
  83. GL_CON_15_ATI = constant.Constant( 'GL_CON_15_ATI', 0x8950 )
  84. GL_CON_16_ATI = constant.Constant( 'GL_CON_16_ATI', 0x8951 )
  85. GL_CON_17_ATI = constant.Constant( 'GL_CON_17_ATI', 0x8952 )
  86. GL_CON_18_ATI = constant.Constant( 'GL_CON_18_ATI', 0x8953 )
  87. GL_CON_19_ATI = constant.Constant( 'GL_CON_19_ATI', 0x8954 )
  88. GL_CON_20_ATI = constant.Constant( 'GL_CON_20_ATI', 0x8955 )
  89. GL_CON_21_ATI = constant.Constant( 'GL_CON_21_ATI', 0x8956 )
  90. GL_CON_22_ATI = constant.Constant( 'GL_CON_22_ATI', 0x8957 )
  91. GL_CON_23_ATI = constant.Constant( 'GL_CON_23_ATI', 0x8958 )
  92. GL_CON_24_ATI = constant.Constant( 'GL_CON_24_ATI', 0x8959 )
  93. GL_CON_25_ATI = constant.Constant( 'GL_CON_25_ATI', 0x895A )
  94. GL_CON_26_ATI = constant.Constant( 'GL_CON_26_ATI', 0x895B )
  95. GL_CON_27_ATI = constant.Constant( 'GL_CON_27_ATI', 0x895C )
  96. GL_CON_28_ATI = constant.Constant( 'GL_CON_28_ATI', 0x895D )
  97. GL_CON_29_ATI = constant.Constant( 'GL_CON_29_ATI', 0x895E )
  98. GL_CON_30_ATI = constant.Constant( 'GL_CON_30_ATI', 0x895F )
  99. GL_CON_31_ATI = constant.Constant( 'GL_CON_31_ATI', 0x8960 )
  100. GL_MOV_ATI = constant.Constant( 'GL_MOV_ATI', 0x8961 )
  101. GL_ADD_ATI = constant.Constant( 'GL_ADD_ATI', 0x8963 )
  102. GL_MUL_ATI = constant.Constant( 'GL_MUL_ATI', 0x8964 )
  103. GL_SUB_ATI = constant.Constant( 'GL_SUB_ATI', 0x8965 )
  104. GL_DOT3_ATI = constant.Constant( 'GL_DOT3_ATI', 0x8966 )
  105. GL_DOT4_ATI = constant.Constant( 'GL_DOT4_ATI', 0x8967 )
  106. GL_MAD_ATI = constant.Constant( 'GL_MAD_ATI', 0x8968 )
  107. GL_LERP_ATI = constant.Constant( 'GL_LERP_ATI', 0x8969 )
  108. GL_CND_ATI = constant.Constant( 'GL_CND_ATI', 0x896A )
  109. GL_CND0_ATI = constant.Constant( 'GL_CND0_ATI', 0x896B )
  110. GL_DOT2_ADD_ATI = constant.Constant( 'GL_DOT2_ADD_ATI', 0x896C )
  111. GL_SECONDARY_INTERPOLATOR_ATI = constant.Constant( 'GL_SECONDARY_INTERPOLATOR_ATI', 0x896D )
  112. GL_NUM_FRAGMENT_REGISTERS_ATI = constant.Constant( 'GL_NUM_FRAGMENT_REGISTERS_ATI', 0x896E )
  113. GL_NUM_FRAGMENT_CONSTANTS_ATI = constant.Constant( 'GL_NUM_FRAGMENT_CONSTANTS_ATI', 0x896F )
  114. GL_NUM_PASSES_ATI = constant.Constant( 'GL_NUM_PASSES_ATI', 0x8970 )
  115. GL_NUM_INSTRUCTIONS_PER_PASS_ATI = constant.Constant( 'GL_NUM_INSTRUCTIONS_PER_PASS_ATI', 0x8971 )
  116. GL_NUM_INSTRUCTIONS_TOTAL_ATI = constant.Constant( 'GL_NUM_INSTRUCTIONS_TOTAL_ATI', 0x8972 )
  117. GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI = constant.Constant( 'GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI', 0x8973 )
  118. GL_NUM_LOOPBACK_COMPONENTS_ATI = constant.Constant( 'GL_NUM_LOOPBACK_COMPONENTS_ATI', 0x8974 )
  119. GL_COLOR_ALPHA_PAIRING_ATI = constant.Constant( 'GL_COLOR_ALPHA_PAIRING_ATI', 0x8975 )
  120. GL_SWIZZLE_STR_ATI = constant.Constant( 'GL_SWIZZLE_STR_ATI', 0x8976 )
  121. GL_SWIZZLE_STQ_ATI = constant.Constant( 'GL_SWIZZLE_STQ_ATI', 0x8977 )
  122. GL_SWIZZLE_STR_DR_ATI = constant.Constant( 'GL_SWIZZLE_STR_DR_ATI', 0x8978 )
  123. GL_SWIZZLE_STQ_DQ_ATI = constant.Constant( 'GL_SWIZZLE_STQ_DQ_ATI', 0x8979 )
  124. GL_SWIZZLE_STRQ_ATI = constant.Constant( 'GL_SWIZZLE_STRQ_ATI', 0x897A )
  125. GL_SWIZZLE_STRQ_DQ_ATI = constant.Constant( 'GL_SWIZZLE_STRQ_DQ_ATI', 0x897B )
  126. GL_RED_BIT_ATI = constant.Constant( 'GL_RED_BIT_ATI', 0x1 )
  127. GL_GREEN_BIT_ATI = constant.Constant( 'GL_GREEN_BIT_ATI', 0x2 )
  128. GL_BLUE_BIT_ATI = constant.Constant( 'GL_BLUE_BIT_ATI', 0x4 )
  129. GL_2X_BIT_ATI = constant.Constant( 'GL_2X_BIT_ATI', 0x1 )
  130. GL_4X_BIT_ATI = constant.Constant( 'GL_4X_BIT_ATI', 0x2 )
  131. GL_8X_BIT_ATI = constant.Constant( 'GL_8X_BIT_ATI', 0x4 )
  132. GL_HALF_BIT_ATI = constant.Constant( 'GL_HALF_BIT_ATI', 0x8 )
  133. GL_QUARTER_BIT_ATI = constant.Constant( 'GL_QUARTER_BIT_ATI', 0x10 )
  134. GL_EIGHTH_BIT_ATI = constant.Constant( 'GL_EIGHTH_BIT_ATI', 0x20 )
  135. GL_SATURATE_BIT_ATI = constant.Constant( 'GL_SATURATE_BIT_ATI', 0x40 )
  136. GL_COMP_BIT_ATI = constant.Constant( 'GL_COMP_BIT_ATI', 0x2 )
  137. GL_NEGATE_BIT_ATI = constant.Constant( 'GL_NEGATE_BIT_ATI', 0x4 )
  138. GL_BIAS_BIT_ATI = constant.Constant( 'GL_BIAS_BIT_ATI', 0x8 )
  139. glGenFragmentShadersATI = platform.createExtensionFunction( 
  140.     'glGenFragmentShadersATI', dll=platform.GL,
  141.     extension=EXTENSION_NAME,
  142.     resultType=constants.GLuint, 
  143.     argTypes=(constants.GLuint,),
  144.     doc = 'glGenFragmentShadersATI( GLuint(range) ) -> constants.GLuint',
  145.     argNames = ('range',),
  146. )
  147.  
  148. glBindFragmentShaderATI = platform.createExtensionFunction( 
  149.     'glBindFragmentShaderATI', dll=platform.GL,
  150.     extension=EXTENSION_NAME,
  151.     resultType=None, 
  152.     argTypes=(constants.GLuint,),
  153.     doc = 'glBindFragmentShaderATI( GLuint(id) ) -> None',
  154.     argNames = ('id',),
  155. )
  156.  
  157. glDeleteFragmentShaderATI = platform.createExtensionFunction( 
  158.     'glDeleteFragmentShaderATI', dll=platform.GL,
  159.     extension=EXTENSION_NAME,
  160.     resultType=None, 
  161.     argTypes=(constants.GLuint,),
  162.     doc = 'glDeleteFragmentShaderATI( GLuint(id) ) -> None',
  163.     argNames = ('id',),
  164. )
  165.  
  166. glBeginFragmentShaderATI = platform.createExtensionFunction( 
  167.     'glBeginFragmentShaderATI', dll=platform.GL,
  168.     extension=EXTENSION_NAME,
  169.     resultType=None, 
  170.     argTypes=(),
  171.     doc = 'glBeginFragmentShaderATI(  ) -> None',
  172.     argNames = (),
  173. )
  174.  
  175. glEndFragmentShaderATI = platform.createExtensionFunction( 
  176.     'glEndFragmentShaderATI', dll=platform.GL,
  177.     extension=EXTENSION_NAME,
  178.     resultType=None, 
  179.     argTypes=(),
  180.     doc = 'glEndFragmentShaderATI(  ) -> None',
  181.     argNames = (),
  182. )
  183.  
  184. glPassTexCoordATI = platform.createExtensionFunction( 
  185.     'glPassTexCoordATI', dll=platform.GL,
  186.     extension=EXTENSION_NAME,
  187.     resultType=None, 
  188.     argTypes=(constants.GLuint, constants.GLuint, constants.GLenum,),
  189.     doc = 'glPassTexCoordATI( GLuint(dst), GLuint(coord), GLenum(swizzle) ) -> None',
  190.     argNames = ('dst', 'coord', 'swizzle',),
  191. )
  192.  
  193. glSampleMapATI = platform.createExtensionFunction( 
  194.     'glSampleMapATI', dll=platform.GL,
  195.     extension=EXTENSION_NAME,
  196.     resultType=None, 
  197.     argTypes=(constants.GLuint, constants.GLuint, constants.GLenum,),
  198.     doc = 'glSampleMapATI( GLuint(dst), GLuint(interp), GLenum(swizzle) ) -> None',
  199.     argNames = ('dst', 'interp', 'swizzle',),
  200. )
  201.  
  202. glColorFragmentOp1ATI = platform.createExtensionFunction( 
  203.     'glColorFragmentOp1ATI', dll=platform.GL,
  204.     extension=EXTENSION_NAME,
  205.     resultType=None, 
  206.     argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint,),
  207.     doc = 'glColorFragmentOp1ATI( GLenum(op), GLuint(dst), GLuint(dstMask), GLuint(dstMod), GLuint(arg1), GLuint(arg1Rep), GLuint(arg1Mod) ) -> None',
  208.     argNames = ('op', 'dst', 'dstMask', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod',),
  209. )
  210.  
  211. glColorFragmentOp2ATI = platform.createExtensionFunction( 
  212.     'glColorFragmentOp2ATI', dll=platform.GL,
  213.     extension=EXTENSION_NAME,
  214.     resultType=None, 
  215.     argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint,),
  216.     doc = 'glColorFragmentOp2ATI( GLenum(op), GLuint(dst), GLuint(dstMask), GLuint(dstMod), GLuint(arg1), GLuint(arg1Rep), GLuint(arg1Mod), GLuint(arg2), GLuint(arg2Rep), GLuint(arg2Mod) ) -> None',
  217.     argNames = ('op', 'dst', 'dstMask', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod', 'arg2', 'arg2Rep', 'arg2Mod',),
  218. )
  219.  
  220. glColorFragmentOp3ATI = platform.createExtensionFunction( 
  221.     'glColorFragmentOp3ATI', dll=platform.GL,
  222.     extension=EXTENSION_NAME,
  223.     resultType=None, 
  224.     argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint,),
  225.     doc = 'glColorFragmentOp3ATI( GLenum(op), GLuint(dst), GLuint(dstMask), GLuint(dstMod), GLuint(arg1), GLuint(arg1Rep), GLuint(arg1Mod), GLuint(arg2), GLuint(arg2Rep), GLuint(arg2Mod), GLuint(arg3), GLuint(arg3Rep), GLuint(arg3Mod) ) -> None',
  226.     argNames = ('op', 'dst', 'dstMask', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod', 'arg2', 'arg2Rep', 'arg2Mod', 'arg3', 'arg3Rep', 'arg3Mod',),
  227. )
  228.  
  229. glAlphaFragmentOp1ATI = platform.createExtensionFunction( 
  230.     'glAlphaFragmentOp1ATI', dll=platform.GL,
  231.     extension=EXTENSION_NAME,
  232.     resultType=None, 
  233.     argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint,),
  234.     doc = 'glAlphaFragmentOp1ATI( GLenum(op), GLuint(dst), GLuint(dstMod), GLuint(arg1), GLuint(arg1Rep), GLuint(arg1Mod) ) -> None',
  235.     argNames = ('op', 'dst', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod',),
  236. )
  237.  
  238. glAlphaFragmentOp2ATI = platform.createExtensionFunction( 
  239.     'glAlphaFragmentOp2ATI', dll=platform.GL,
  240.     extension=EXTENSION_NAME,
  241.     resultType=None, 
  242.     argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint,),
  243.     doc = 'glAlphaFragmentOp2ATI( GLenum(op), GLuint(dst), GLuint(dstMod), GLuint(arg1), GLuint(arg1Rep), GLuint(arg1Mod), GLuint(arg2), GLuint(arg2Rep), GLuint(arg2Mod) ) -> None',
  244.     argNames = ('op', 'dst', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod', 'arg2', 'arg2Rep', 'arg2Mod',),
  245. )
  246.  
  247. glAlphaFragmentOp3ATI = platform.createExtensionFunction( 
  248.     'glAlphaFragmentOp3ATI', dll=platform.GL,
  249.     extension=EXTENSION_NAME,
  250.     resultType=None, 
  251.     argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint,),
  252.     doc = 'glAlphaFragmentOp3ATI( GLenum(op), GLuint(dst), GLuint(dstMod), GLuint(arg1), GLuint(arg1Rep), GLuint(arg1Mod), GLuint(arg2), GLuint(arg2Rep), GLuint(arg2Mod), GLuint(arg3), GLuint(arg3Rep), GLuint(arg3Mod) ) -> None',
  253.     argNames = ('op', 'dst', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod', 'arg2', 'arg2Rep', 'arg2Mod', 'arg3', 'arg3Rep', 'arg3Mod',),
  254. )
  255.  
  256. glSetFragmentShaderConstantATI = platform.createExtensionFunction( 
  257.     'glSetFragmentShaderConstantATI', dll=platform.GL,
  258.     extension=EXTENSION_NAME,
  259.     resultType=None, 
  260.     argTypes=(constants.GLuint, arrays.GLfloatArray,),
  261.     doc = 'glSetFragmentShaderConstantATI( GLuint(dst), GLfloatArray(value) ) -> None',
  262.     argNames = ('dst', 'value',),
  263. )
  264.  
  265.  
  266. def glInitFragmentShaderATI():
  267.     '''Return boolean indicating whether this extension is available'''
  268.     return extensions.hasGLExtension( EXTENSION_NAME )
  269.