File: fragment_shader.py

package info (click to toggle)
pyopengl 3.0.0~b6-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 5,696 kB
  • ctags: 26,182
  • sloc: python: 34,233; ansic: 70; sh: 26; makefile: 15
file content (268 lines) | stat: -rw-r--r-- 14,337 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
'''OpenGL extension ATI.fragment_shader

Overview (from the spec)
	
	This extension exposes a powerful fragment shading model which
	provides a very general means of expressing fragment color blending
	and dependent texture address modification.  The programming is
	a register-based model in which there is a fixed number of 
	instructions, texture lookups, read/write registers, and constants.
	
	The fragment shader extension provides a unified instruction set
	for operating on address or color data and eliminates the 
	distinction between the two.  This extension provides all the 
	interfaces necessary to fully expose this programmable fragment 
	shader in GL.
	
	Although conceived as a device-independent extension which would 
	expose the capabilities of future generations of hardware, changing 
	trends in programmable hardware have affected the lifespan of this 
	extension.  For this reason you will now find a fixed set of 
	features and resources exposed, and the queries to determine this 
	set have been deprecated.

The official definition of this extension is available here:
	http://oss.sgi.com/projects/ogl-sample/registry/ATI/fragment_shader.txt

Automatically generated by the get_gl_extensions script, do not edit!
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions
from OpenGL.GL import glget
import ctypes
EXTENSION_NAME = 'GL_ATI_fragment_shader'
GL_FRAGMENT_SHADER_ATI = constant.Constant( 'GL_FRAGMENT_SHADER_ATI', 0x8920 )
glget.addGLGetConstant( GL_FRAGMENT_SHADER_ATI, (1,) )
GL_REG_0_ATI = constant.Constant( 'GL_REG_0_ATI', 0x8921 )
GL_REG_1_ATI = constant.Constant( 'GL_REG_1_ATI', 0x8922 )
GL_REG_2_ATI = constant.Constant( 'GL_REG_2_ATI', 0x8923 )
GL_REG_3_ATI = constant.Constant( 'GL_REG_3_ATI', 0x8924 )
GL_REG_4_ATI = constant.Constant( 'GL_REG_4_ATI', 0x8925 )
GL_REG_5_ATI = constant.Constant( 'GL_REG_5_ATI', 0x8926 )
GL_REG_6_ATI = constant.Constant( 'GL_REG_6_ATI', 0x8927 )
GL_REG_7_ATI = constant.Constant( 'GL_REG_7_ATI', 0x8928 )
GL_REG_8_ATI = constant.Constant( 'GL_REG_8_ATI', 0x8929 )
GL_REG_9_ATI = constant.Constant( 'GL_REG_9_ATI', 0x892A )
GL_REG_10_ATI = constant.Constant( 'GL_REG_10_ATI', 0x892B )
GL_REG_11_ATI = constant.Constant( 'GL_REG_11_ATI', 0x892C )
GL_REG_12_ATI = constant.Constant( 'GL_REG_12_ATI', 0x892D )
GL_REG_13_ATI = constant.Constant( 'GL_REG_13_ATI', 0x892E )
GL_REG_14_ATI = constant.Constant( 'GL_REG_14_ATI', 0x892F )
GL_REG_15_ATI = constant.Constant( 'GL_REG_15_ATI', 0x8930 )
GL_REG_16_ATI = constant.Constant( 'GL_REG_16_ATI', 0x8931 )
GL_REG_17_ATI = constant.Constant( 'GL_REG_17_ATI', 0x8932 )
GL_REG_18_ATI = constant.Constant( 'GL_REG_18_ATI', 0x8933 )
GL_REG_19_ATI = constant.Constant( 'GL_REG_19_ATI', 0x8934 )
GL_REG_20_ATI = constant.Constant( 'GL_REG_20_ATI', 0x8935 )
GL_REG_21_ATI = constant.Constant( 'GL_REG_21_ATI', 0x8936 )
GL_REG_22_ATI = constant.Constant( 'GL_REG_22_ATI', 0x8937 )
GL_REG_23_ATI = constant.Constant( 'GL_REG_23_ATI', 0x8938 )
GL_REG_24_ATI = constant.Constant( 'GL_REG_24_ATI', 0x8939 )
GL_REG_25_ATI = constant.Constant( 'GL_REG_25_ATI', 0x893A )
GL_REG_26_ATI = constant.Constant( 'GL_REG_26_ATI', 0x893B )
GL_REG_27_ATI = constant.Constant( 'GL_REG_27_ATI', 0x893C )
GL_REG_28_ATI = constant.Constant( 'GL_REG_28_ATI', 0x893D )
GL_REG_29_ATI = constant.Constant( 'GL_REG_29_ATI', 0x893E )
GL_REG_30_ATI = constant.Constant( 'GL_REG_30_ATI', 0x893F )
GL_REG_31_ATI = constant.Constant( 'GL_REG_31_ATI', 0x8940 )
GL_CON_0_ATI = constant.Constant( 'GL_CON_0_ATI', 0x8941 )
GL_CON_1_ATI = constant.Constant( 'GL_CON_1_ATI', 0x8942 )
GL_CON_2_ATI = constant.Constant( 'GL_CON_2_ATI', 0x8943 )
GL_CON_3_ATI = constant.Constant( 'GL_CON_3_ATI', 0x8944 )
GL_CON_4_ATI = constant.Constant( 'GL_CON_4_ATI', 0x8945 )
GL_CON_5_ATI = constant.Constant( 'GL_CON_5_ATI', 0x8946 )
GL_CON_6_ATI = constant.Constant( 'GL_CON_6_ATI', 0x8947 )
GL_CON_7_ATI = constant.Constant( 'GL_CON_7_ATI', 0x8948 )
GL_CON_8_ATI = constant.Constant( 'GL_CON_8_ATI', 0x8949 )
GL_CON_9_ATI = constant.Constant( 'GL_CON_9_ATI', 0x894A )
GL_CON_10_ATI = constant.Constant( 'GL_CON_10_ATI', 0x894B )
GL_CON_11_ATI = constant.Constant( 'GL_CON_11_ATI', 0x894C )
GL_CON_12_ATI = constant.Constant( 'GL_CON_12_ATI', 0x894D )
GL_CON_13_ATI = constant.Constant( 'GL_CON_13_ATI', 0x894E )
GL_CON_14_ATI = constant.Constant( 'GL_CON_14_ATI', 0x894F )
GL_CON_15_ATI = constant.Constant( 'GL_CON_15_ATI', 0x8950 )
GL_CON_16_ATI = constant.Constant( 'GL_CON_16_ATI', 0x8951 )
GL_CON_17_ATI = constant.Constant( 'GL_CON_17_ATI', 0x8952 )
GL_CON_18_ATI = constant.Constant( 'GL_CON_18_ATI', 0x8953 )
GL_CON_19_ATI = constant.Constant( 'GL_CON_19_ATI', 0x8954 )
GL_CON_20_ATI = constant.Constant( 'GL_CON_20_ATI', 0x8955 )
GL_CON_21_ATI = constant.Constant( 'GL_CON_21_ATI', 0x8956 )
GL_CON_22_ATI = constant.Constant( 'GL_CON_22_ATI', 0x8957 )
GL_CON_23_ATI = constant.Constant( 'GL_CON_23_ATI', 0x8958 )
GL_CON_24_ATI = constant.Constant( 'GL_CON_24_ATI', 0x8959 )
GL_CON_25_ATI = constant.Constant( 'GL_CON_25_ATI', 0x895A )
GL_CON_26_ATI = constant.Constant( 'GL_CON_26_ATI', 0x895B )
GL_CON_27_ATI = constant.Constant( 'GL_CON_27_ATI', 0x895C )
GL_CON_28_ATI = constant.Constant( 'GL_CON_28_ATI', 0x895D )
GL_CON_29_ATI = constant.Constant( 'GL_CON_29_ATI', 0x895E )
GL_CON_30_ATI = constant.Constant( 'GL_CON_30_ATI', 0x895F )
GL_CON_31_ATI = constant.Constant( 'GL_CON_31_ATI', 0x8960 )
GL_MOV_ATI = constant.Constant( 'GL_MOV_ATI', 0x8961 )
GL_ADD_ATI = constant.Constant( 'GL_ADD_ATI', 0x8963 )
GL_MUL_ATI = constant.Constant( 'GL_MUL_ATI', 0x8964 )
GL_SUB_ATI = constant.Constant( 'GL_SUB_ATI', 0x8965 )
GL_DOT3_ATI = constant.Constant( 'GL_DOT3_ATI', 0x8966 )
GL_DOT4_ATI = constant.Constant( 'GL_DOT4_ATI', 0x8967 )
GL_MAD_ATI = constant.Constant( 'GL_MAD_ATI', 0x8968 )
GL_LERP_ATI = constant.Constant( 'GL_LERP_ATI', 0x8969 )
GL_CND_ATI = constant.Constant( 'GL_CND_ATI', 0x896A )
GL_CND0_ATI = constant.Constant( 'GL_CND0_ATI', 0x896B )
GL_DOT2_ADD_ATI = constant.Constant( 'GL_DOT2_ADD_ATI', 0x896C )
GL_SECONDARY_INTERPOLATOR_ATI = constant.Constant( 'GL_SECONDARY_INTERPOLATOR_ATI', 0x896D )
GL_NUM_FRAGMENT_REGISTERS_ATI = constant.Constant( 'GL_NUM_FRAGMENT_REGISTERS_ATI', 0x896E )
GL_NUM_FRAGMENT_CONSTANTS_ATI = constant.Constant( 'GL_NUM_FRAGMENT_CONSTANTS_ATI', 0x896F )
GL_NUM_PASSES_ATI = constant.Constant( 'GL_NUM_PASSES_ATI', 0x8970 )
GL_NUM_INSTRUCTIONS_PER_PASS_ATI = constant.Constant( 'GL_NUM_INSTRUCTIONS_PER_PASS_ATI', 0x8971 )
GL_NUM_INSTRUCTIONS_TOTAL_ATI = constant.Constant( 'GL_NUM_INSTRUCTIONS_TOTAL_ATI', 0x8972 )
GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI = constant.Constant( 'GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI', 0x8973 )
GL_NUM_LOOPBACK_COMPONENTS_ATI = constant.Constant( 'GL_NUM_LOOPBACK_COMPONENTS_ATI', 0x8974 )
GL_COLOR_ALPHA_PAIRING_ATI = constant.Constant( 'GL_COLOR_ALPHA_PAIRING_ATI', 0x8975 )
GL_SWIZZLE_STR_ATI = constant.Constant( 'GL_SWIZZLE_STR_ATI', 0x8976 )
GL_SWIZZLE_STQ_ATI = constant.Constant( 'GL_SWIZZLE_STQ_ATI', 0x8977 )
GL_SWIZZLE_STR_DR_ATI = constant.Constant( 'GL_SWIZZLE_STR_DR_ATI', 0x8978 )
GL_SWIZZLE_STQ_DQ_ATI = constant.Constant( 'GL_SWIZZLE_STQ_DQ_ATI', 0x8979 )
GL_SWIZZLE_STRQ_ATI = constant.Constant( 'GL_SWIZZLE_STRQ_ATI', 0x897A )
GL_SWIZZLE_STRQ_DQ_ATI = constant.Constant( 'GL_SWIZZLE_STRQ_DQ_ATI', 0x897B )
GL_RED_BIT_ATI = constant.Constant( 'GL_RED_BIT_ATI', 0x1 )
GL_GREEN_BIT_ATI = constant.Constant( 'GL_GREEN_BIT_ATI', 0x2 )
GL_BLUE_BIT_ATI = constant.Constant( 'GL_BLUE_BIT_ATI', 0x4 )
GL_2X_BIT_ATI = constant.Constant( 'GL_2X_BIT_ATI', 0x1 )
GL_4X_BIT_ATI = constant.Constant( 'GL_4X_BIT_ATI', 0x2 )
GL_8X_BIT_ATI = constant.Constant( 'GL_8X_BIT_ATI', 0x4 )
GL_HALF_BIT_ATI = constant.Constant( 'GL_HALF_BIT_ATI', 0x8 )
GL_QUARTER_BIT_ATI = constant.Constant( 'GL_QUARTER_BIT_ATI', 0x10 )
GL_EIGHTH_BIT_ATI = constant.Constant( 'GL_EIGHTH_BIT_ATI', 0x20 )
GL_SATURATE_BIT_ATI = constant.Constant( 'GL_SATURATE_BIT_ATI', 0x40 )
GL_COMP_BIT_ATI = constant.Constant( 'GL_COMP_BIT_ATI', 0x2 )
GL_NEGATE_BIT_ATI = constant.Constant( 'GL_NEGATE_BIT_ATI', 0x4 )
GL_BIAS_BIT_ATI = constant.Constant( 'GL_BIAS_BIT_ATI', 0x8 )
glGenFragmentShadersATI = platform.createExtensionFunction( 
	'glGenFragmentShadersATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=constants.GLuint, 
	argTypes=(constants.GLuint,),
	doc = 'glGenFragmentShadersATI( GLuint(range) ) -> constants.GLuint',
	argNames = ('range',),
)

glBindFragmentShaderATI = platform.createExtensionFunction( 
	'glBindFragmentShaderATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLuint,),
	doc = 'glBindFragmentShaderATI( GLuint(id) ) -> None',
	argNames = ('id',),
)

glDeleteFragmentShaderATI = platform.createExtensionFunction( 
	'glDeleteFragmentShaderATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLuint,),
	doc = 'glDeleteFragmentShaderATI( GLuint(id) ) -> None',
	argNames = ('id',),
)

glBeginFragmentShaderATI = platform.createExtensionFunction( 
	'glBeginFragmentShaderATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(),
	doc = 'glBeginFragmentShaderATI(  ) -> None',
	argNames = (),
)

glEndFragmentShaderATI = platform.createExtensionFunction( 
	'glEndFragmentShaderATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(),
	doc = 'glEndFragmentShaderATI(  ) -> None',
	argNames = (),
)

glPassTexCoordATI = platform.createExtensionFunction( 
	'glPassTexCoordATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLuint, constants.GLuint, constants.GLenum,),
	doc = 'glPassTexCoordATI( GLuint(dst), GLuint(coord), GLenum(swizzle) ) -> None',
	argNames = ('dst', 'coord', 'swizzle',),
)

glSampleMapATI = platform.createExtensionFunction( 
	'glSampleMapATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLuint, constants.GLuint, constants.GLenum,),
	doc = 'glSampleMapATI( GLuint(dst), GLuint(interp), GLenum(swizzle) ) -> None',
	argNames = ('dst', 'interp', 'swizzle',),
)

glColorFragmentOp1ATI = platform.createExtensionFunction( 
	'glColorFragmentOp1ATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint,),
	doc = 'glColorFragmentOp1ATI( GLenum(op), GLuint(dst), GLuint(dstMask), GLuint(dstMod), GLuint(arg1), GLuint(arg1Rep), GLuint(arg1Mod) ) -> None',
	argNames = ('op', 'dst', 'dstMask', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod',),
)

glColorFragmentOp2ATI = platform.createExtensionFunction( 
	'glColorFragmentOp2ATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint,),
	doc = 'glColorFragmentOp2ATI( GLenum(op), GLuint(dst), GLuint(dstMask), GLuint(dstMod), GLuint(arg1), GLuint(arg1Rep), GLuint(arg1Mod), GLuint(arg2), GLuint(arg2Rep), GLuint(arg2Mod) ) -> None',
	argNames = ('op', 'dst', 'dstMask', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod', 'arg2', 'arg2Rep', 'arg2Mod',),
)

glColorFragmentOp3ATI = platform.createExtensionFunction( 
	'glColorFragmentOp3ATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	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,),
	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',
	argNames = ('op', 'dst', 'dstMask', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod', 'arg2', 'arg2Rep', 'arg2Mod', 'arg3', 'arg3Rep', 'arg3Mod',),
)

glAlphaFragmentOp1ATI = platform.createExtensionFunction( 
	'glAlphaFragmentOp1ATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint,),
	doc = 'glAlphaFragmentOp1ATI( GLenum(op), GLuint(dst), GLuint(dstMod), GLuint(arg1), GLuint(arg1Rep), GLuint(arg1Mod) ) -> None',
	argNames = ('op', 'dst', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod',),
)

glAlphaFragmentOp2ATI = platform.createExtensionFunction( 
	'glAlphaFragmentOp2ATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint, constants.GLuint,),
	doc = 'glAlphaFragmentOp2ATI( GLenum(op), GLuint(dst), GLuint(dstMod), GLuint(arg1), GLuint(arg1Rep), GLuint(arg1Mod), GLuint(arg2), GLuint(arg2Rep), GLuint(arg2Mod) ) -> None',
	argNames = ('op', 'dst', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod', 'arg2', 'arg2Rep', 'arg2Mod',),
)

glAlphaFragmentOp3ATI = platform.createExtensionFunction( 
	'glAlphaFragmentOp3ATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	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,),
	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',
	argNames = ('op', 'dst', 'dstMod', 'arg1', 'arg1Rep', 'arg1Mod', 'arg2', 'arg2Rep', 'arg2Mod', 'arg3', 'arg3Rep', 'arg3Mod',),
)

glSetFragmentShaderConstantATI = platform.createExtensionFunction( 
	'glSetFragmentShaderConstantATI', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLuint, arrays.GLfloatArray,),
	doc = 'glSetFragmentShaderConstantATI( GLuint(dst), GLfloatArray(value) ) -> None',
	argNames = ('dst', 'value',),
)


def glInitFragmentShaderATI():
	'''Return boolean indicating whether this extension is available'''
	return extensions.hasGLExtension( EXTENSION_NAME )