10 #if !defined( __CYGWIN__ ) && !defined( __CYGWIN32__ )
11 # if !defined( HAVE_STL_SGI_PORT ) && !defined( __MWERKS__ )
12 // Avoid malloc with STLport and MSL
29 int xglTraceOn = TRUE ;
32 FILE *xglTraceFd = stdout ;
34 /* Bail for now, we just want it to compile I guess */
35 FILE *xglTraceFd = NULL;
44 static struct GLenumLookup glenum_string [] =
47 Due to ambiguity - these are not in the table...
49 GL_NONE = , GL_ZERO = GL_FALSE = GL_POINTS = 0
50 GL_ONE = , GL_TRUE = GL_LINES = 1
53 { GL_2_BYTES ,"GL_2_BYTES" },
55 { GL_3D_COLOR ,"GL_3D_COLOR" },
56 { GL_3D_COLOR_TEXTURE ,"GL_3D_COLOR_TEXTURE" },
57 { GL_3_BYTES ,"GL_3_BYTES" },
58 { GL_4D_COLOR_TEXTURE ,"GL_4D_COLOR_TEXTURE" },
59 { GL_4_BYTES ,"GL_4_BYTES" },
60 { GL_ACCUM ,"GL_ACCUM" },
61 { GL_ACCUM_ALPHA_BITS ,"GL_ACCUM_ALPHA_BITS" },
62 { GL_ACCUM_BLUE_BITS ,"GL_ACCUM_BLUE_BITS" },
63 { GL_ACCUM_CLEAR_VALUE ,"GL_ACCUM_CLEAR_VALUE" },
64 { GL_ACCUM_GREEN_BITS ,"GL_ACCUM_GREEN_BITS" },
65 { GL_ACCUM_RED_BITS ,"GL_ACCUM_RED_BITS" },
67 { GL_ALPHA ,"GL_ALPHA" },
68 { GL_ALPHA_BIAS ,"GL_ALPHA_BIAS" },
69 { GL_ALPHA_BITS ,"GL_ALPHA_BITS" },
70 { GL_ALPHA_SCALE ,"GL_ALPHA_SCALE" },
71 { GL_ALPHA_TEST ,"GL_ALPHA_TEST" },
72 { GL_ALPHA_TEST_FUNC ,"GL_ALPHA_TEST_FUNC" },
73 { GL_ALPHA_TEST_REF ,"GL_ALPHA_TEST_REF" },
74 { GL_ALWAYS ,"GL_ALWAYS" },
75 { GL_AMBIENT ,"GL_AMBIENT" },
76 { GL_AMBIENT_AND_DIFFUSE ,"GL_AMBIENT_AND_DIFFUSE" },
78 { GL_AND_INVERTED ,"GL_AND_INVERTED" },
79 { GL_AND_REVERSE ,"GL_AND_REVERSE" },
80 { GL_ATTRIB_STACK_DEPTH ,"GL_ATTRIB_STACK_DEPTH" },
81 { GL_AUTO_NORMAL ,"GL_AUTO_NORMAL" },
82 { GL_AUX0 ,"GL_AUX0" },
83 { GL_AUX1 ,"GL_AUX1" },
84 { GL_AUX2 ,"GL_AUX2" },
85 { GL_AUX3 ,"GL_AUX3" },
86 { GL_AUX_BUFFERS ,"GL_AUX_BUFFERS" },
87 { GL_BACK ,"GL_BACK" },
88 { GL_BACK_LEFT ,"GL_BACK_LEFT" },
89 { GL_BACK_RIGHT ,"GL_BACK_RIGHT" },
90 { GL_BITMAP ,"GL_BITMAP" },
91 { GL_BITMAP_TOKEN ,"GL_BITMAP_TOKEN" },
92 { GL_BLEND ,"GL_BLEND" },
93 { GL_BLEND_DST ,"GL_BLEND_DST" },
94 #ifdef GL_BLEND_COLOR_EXT
95 { GL_BLEND_COLOR_EXT ,"GL_BLEND_COLOR_EXT" },
97 #ifdef GL_BLEND_EQUATION_EXT
98 { GL_BLEND_EQUATION_EXT ,"GL_BLEND_EQUATION_EXT" },
100 { GL_BLEND_SRC ,"GL_BLEND_SRC" },
101 { GL_BLUE ,"GL_BLUE" },
102 { GL_BLUE_BIAS ,"GL_BLUE_BIAS" },
103 { GL_BLUE_BITS ,"GL_BLUE_BITS" },
104 { GL_BLUE_SCALE ,"GL_BLUE_SCALE" },
105 { GL_BYTE ,"GL_BYTE" },
106 { GL_CCW ,"GL_CCW" },
107 { GL_CLAMP ,"GL_CLAMP" },
108 { GL_CLEAR ,"GL_CLEAR" },
109 { GL_CLIP_PLANE0 ,"GL_CLIP_PLANE0" },
110 { GL_CLIP_PLANE1 ,"GL_CLIP_PLANE1" },
111 { GL_CLIP_PLANE2 ,"GL_CLIP_PLANE2" },
112 { GL_CLIP_PLANE3 ,"GL_CLIP_PLANE3" },
113 { GL_CLIP_PLANE4 ,"GL_CLIP_PLANE4" },
114 { GL_CLIP_PLANE5 ,"GL_CLIP_PLANE5" },
115 { GL_COEFF ,"GL_COEFF" },
116 { GL_COLOR ,"GL_COLOR" },
117 #ifdef GL_COLOR_ARRAY_EXT
118 { GL_COLOR_ARRAY_COUNT_EXT ,"GL_COLOR_ARRAY_COUNT_EXT" },
119 { GL_COLOR_ARRAY_EXT ,"GL_COLOR_ARRAY_EXT" },
120 { GL_COLOR_ARRAY_POINTER_EXT ,"GL_COLOR_ARRAY_POINTER_EXT" },
121 { GL_COLOR_ARRAY_SIZE_EXT ,"GL_COLOR_ARRAY_SIZE_EXT" },
122 { GL_COLOR_ARRAY_STRIDE_EXT ,"GL_COLOR_ARRAY_STRIDE_EXT" },
123 { GL_COLOR_ARRAY_TYPE_EXT ,"GL_COLOR_ARRAY_TYPE_EXT" },
125 { GL_COLOR_CLEAR_VALUE ,"GL_COLOR_CLEAR_VALUE" },
126 { GL_COLOR_INDEX ,"GL_COLOR_INDEX" },
127 { GL_COLOR_INDEXES ,"GL_COLOR_INDEXES" },
128 { GL_COLOR_MATERIAL ,"GL_COLOR_MATERIAL" },
129 { GL_COLOR_MATERIAL_FACE ,"GL_COLOR_MATERIAL_FACE" },
130 { GL_COLOR_MATERIAL_PARAMETER ,"GL_COLOR_MATERIAL_PARAMETER" },
131 { GL_COLOR_WRITEMASK ,"GL_COLOR_WRITEMASK" },
132 { GL_COMPILE ,"GL_COMPILE" },
133 { GL_COMPILE_AND_EXECUTE ,"GL_COMPILE_AND_EXECUTE" },
134 #ifdef GL_CONSTANT_ALPHA_EXT
135 { GL_CONSTANT_ALPHA_EXT ,"GL_CONSTANT_ALPHA_EXT" },
137 { GL_CONSTANT_ATTENUATION ,"GL_CONSTANT_ATTENUATION" },
138 #ifdef GL_CONSTANT_COLOR_EXT
139 { GL_CONSTANT_COLOR_EXT ,"GL_CONSTANT_COLOR_EXT" },
141 { GL_COPY ,"GL_COPY" },
142 { GL_COPY_INVERTED ,"GL_COPY_INVERTED" },
143 { GL_COPY_PIXEL_TOKEN ,"GL_COPY_PIXEL_TOKEN" },
144 { GL_CULL_FACE ,"GL_CULL_FACE" },
145 { GL_CULL_FACE_MODE ,"GL_CULL_FACE_MODE" },
146 { GL_CURRENT_COLOR ,"GL_CURRENT_COLOR" },
147 { GL_CURRENT_INDEX ,"GL_CURRENT_INDEX" },
148 { GL_CURRENT_NORMAL ,"GL_CURRENT_NORMAL" },
149 { GL_CURRENT_RASTER_COLOR ,"GL_CURRENT_RASTER_COLOR" },
150 { GL_CURRENT_RASTER_DISTANCE ,"GL_CURRENT_RASTER_DISTANCE" },
151 { GL_CURRENT_RASTER_INDEX ,"GL_CURRENT_RASTER_INDEX" },
152 { GL_CURRENT_RASTER_POSITION ,"GL_CURRENT_RASTER_POSITION" },
153 { GL_CURRENT_RASTER_POSITION_VALID,"GL_CURRENT_RASTER_POSITION_VALID" },
154 { GL_CURRENT_RASTER_TEXTURE_COORDS,"GL_CURRENT_RASTER_TEXTURE_COORDS" },
155 { GL_CURRENT_TEXTURE_COORDS ,"GL_CURRENT_TEXTURE_COORDS" },
157 { GL_DECAL ,"GL_DECAL" },
158 { GL_DECR ,"GL_DECR" },
159 { GL_DEPTH ,"GL_DEPTH" },
160 { GL_DEPTH_BIAS ,"GL_DEPTH_BIAS" },
161 { GL_DEPTH_BITS ,"GL_DEPTH_BITS" },
162 { GL_DEPTH_CLEAR_VALUE ,"GL_DEPTH_CLEAR_VALUE" },
163 { GL_DEPTH_COMPONENT ,"GL_DEPTH_COMPONENT" },
164 { GL_DEPTH_FUNC ,"GL_DEPTH_FUNC" },
165 { GL_DEPTH_RANGE ,"GL_DEPTH_RANGE" },
166 { GL_DEPTH_SCALE ,"GL_DEPTH_SCALE" },
167 { GL_DEPTH_TEST ,"GL_DEPTH_TEST" },
168 { GL_DEPTH_WRITEMASK ,"GL_DEPTH_WRITEMASK" },
169 { GL_DIFFUSE ,"GL_DIFFUSE" },
170 { GL_DITHER ,"GL_DITHER" },
171 { GL_DOMAIN ,"GL_DOMAIN" },
172 { GL_DONT_CARE ,"GL_DONT_CARE" },
173 { GL_DOUBLEBUFFER ,"GL_DOUBLEBUFFER" },
175 { GL_DOUBLE_EXT ,"GL_DOUBLE_EXT" },
177 { GL_DRAW_BUFFER ,"GL_DRAW_BUFFER" },
178 { GL_DRAW_PIXEL_TOKEN ,"GL_DRAW_PIXEL_TOKEN" },
179 { GL_DST_ALPHA ,"GL_DST_ALPHA" },
180 { GL_DST_COLOR ,"GL_DST_COLOR" },
181 { GL_EDGE_FLAG ,"GL_EDGE_FLAG" },
182 #ifdef GL_EDGE_FLAG_ARRAY_EXT
183 { GL_EDGE_FLAG_ARRAY_COUNT_EXT,"GL_EDGE_FLAG_ARRAY_COUNT_EXT" },
184 { GL_EDGE_FLAG_ARRAY_EXT ,"GL_EDGE_FLAG_ARRAY_EXT" },
185 { GL_EDGE_FLAG_ARRAY_POINTER_EXT,"GL_EDGE_FLAG_ARRAY_POINTER_EXT" },
186 { GL_EDGE_FLAG_ARRAY_STRIDE_EXT,"GL_EDGE_FLAG_ARRAY_STRIDE_EXT" },
188 { GL_EMISSION ,"GL_EMISSION" },
189 { GL_EQUAL ,"GL_EQUAL" },
190 { GL_EQUIV ,"GL_EQUIV" },
191 { GL_EXP ,"GL_EXP" },
192 { GL_EXP2 ,"GL_EXP2" },
193 { GL_EXTENSIONS ,"GL_EXTENSIONS" },
194 { GL_EYE_LINEAR ,"GL_EYE_LINEAR" },
195 { GL_EYE_PLANE ,"GL_EYE_PLANE" },
196 { GL_FASTEST ,"GL_FASTEST" },
197 { GL_FEEDBACK ,"GL_FEEDBACK" },
198 { GL_FILL ,"GL_FILL" },
199 { GL_FLAT ,"GL_FLAT" },
200 { GL_FLOAT ,"GL_FLOAT" },
201 { GL_FOG ,"GL_FOG" },
202 { GL_FOG_COLOR ,"GL_FOG_COLOR" },
203 { GL_FOG_DENSITY ,"GL_FOG_DENSITY" },
204 { GL_FOG_END ,"GL_FOG_END" },
205 { GL_FOG_HINT ,"GL_FOG_HINT" },
206 { GL_FOG_INDEX ,"GL_FOG_INDEX" },
207 { GL_FOG_MODE ,"GL_FOG_MODE" },
208 { GL_FOG_START ,"GL_FOG_START" },
209 { GL_FRONT ,"GL_FRONT" },
210 { GL_FRONT_AND_BACK ,"GL_FRONT_AND_BACK" },
211 { GL_FRONT_FACE ,"GL_FRONT_FACE" },
212 { GL_FRONT_LEFT ,"GL_FRONT_LEFT" },
213 { GL_FRONT_RIGHT ,"GL_FRONT_RIGHT" },
214 #ifdef GL_FUNC_ADD_EXT
215 { GL_FUNC_ADD_EXT ,"GL_FUNC_ADD_EXT" },
216 { GL_FUNC_REVERSE_SUBTRACT_EXT,"GL_FUNC_REVERSE_SUBTRACT_EXT" },
217 { GL_FUNC_SUBTRACT_EXT ,"GL_FUNC_SUBTRACT_EXT" },
219 { GL_GEQUAL ,"GL_GEQUAL" },
220 { GL_GREATER ,"GL_GREATER" },
221 { GL_GREEN ,"GL_GREEN" },
222 { GL_GREEN_BIAS ,"GL_GREEN_BIAS" },
223 { GL_GREEN_BITS ,"GL_GREEN_BITS" },
224 { GL_GREEN_SCALE ,"GL_GREEN_SCALE" },
225 { GL_INCR ,"GL_INCR" },
226 #ifdef GL_INDEX_ARRAY_EXT
227 { GL_INDEX_ARRAY_COUNT_EXT ,"GL_INDEX_ARRAY_COUNT_EXT" },
228 { GL_INDEX_ARRAY_EXT ,"GL_INDEX_ARRAY_EXT" },
229 { GL_INDEX_ARRAY_POINTER_EXT ,"GL_INDEX_ARRAY_POINTER_EXT" },
230 { GL_INDEX_ARRAY_STRIDE_EXT ,"GL_INDEX_ARRAY_STRIDE_EXT" },
231 { GL_INDEX_ARRAY_TYPE_EXT ,"GL_INDEX_ARRAY_TYPE_EXT" },
233 { GL_INDEX_BITS ,"GL_INDEX_BITS" },
234 { GL_INDEX_CLEAR_VALUE ,"GL_INDEX_CLEAR_VALUE" },
235 { GL_INDEX_MODE ,"GL_INDEX_MODE" },
236 { GL_INDEX_OFFSET ,"GL_INDEX_OFFSET" },
237 { GL_INDEX_SHIFT ,"GL_INDEX_SHIFT" },
238 { GL_INDEX_WRITEMASK ,"GL_INDEX_WRITEMASK" },
239 { GL_INT ,"GL_INT" },
240 { GL_INVALID_ENUM ,"GL_INVALID_ENUM" },
241 { GL_INVALID_OPERATION ,"GL_INVALID_OPERATION" },
242 { GL_INVALID_VALUE ,"GL_INVALID_VALUE" },
243 { GL_INVERT ,"GL_INVERT" },
244 { GL_KEEP ,"GL_KEEP" },
245 { GL_LEFT ,"GL_LEFT" },
246 { GL_LEQUAL ,"GL_LEQUAL" },
247 { GL_LESS ,"GL_LESS" },
248 { GL_LIGHT0 ,"GL_LIGHT0" },
249 { GL_LIGHT1 ,"GL_LIGHT1" },
250 { GL_LIGHT2 ,"GL_LIGHT2" },
251 { GL_LIGHT3 ,"GL_LIGHT3" },
252 { GL_LIGHT4 ,"GL_LIGHT4" },
253 { GL_LIGHT5 ,"GL_LIGHT5" },
254 { GL_LIGHT6 ,"GL_LIGHT6" },
255 { GL_LIGHT7 ,"GL_LIGHT7" },
256 { GL_LIGHTING ,"GL_LIGHTING" },
257 { GL_LIGHT_MODEL_AMBIENT ,"GL_LIGHT_MODEL_AMBIENT" },
258 { GL_LIGHT_MODEL_LOCAL_VIEWER ,"GL_LIGHT_MODEL_LOCAL_VIEWER" },
259 { GL_LIGHT_MODEL_TWO_SIDE ,"GL_LIGHT_MODEL_TWO_SIDE" },
260 { GL_LINE ,"GL_LINE" },
261 { GL_LINEAR ,"GL_LINEAR" },
262 { GL_LINEAR_ATTENUATION ,"GL_LINEAR_ATTENUATION" },
263 { GL_LINEAR_MIPMAP_LINEAR ,"GL_LINEAR_MIPMAP_LINEAR" },
264 { GL_LINEAR_MIPMAP_NEAREST ,"GL_LINEAR_MIPMAP_NEAREST" },
265 { GL_LINE_LOOP ,"GL_LINE_LOOP" },
266 { GL_LINE_RESET_TOKEN ,"GL_LINE_RESET_TOKEN" },
267 { GL_LINE_SMOOTH ,"GL_LINE_SMOOTH" },
268 { GL_LINE_SMOOTH_HINT ,"GL_LINE_SMOOTH_HINT" },
269 { GL_LINE_STIPPLE ,"GL_LINE_STIPPLE" },
270 { GL_LINE_STIPPLE_PATTERN ,"GL_LINE_STIPPLE_PATTERN" },
271 { GL_LINE_STIPPLE_REPEAT ,"GL_LINE_STIPPLE_REPEAT" },
272 { GL_LINE_STRIP ,"GL_LINE_STRIP" },
273 { GL_LINE_TOKEN ,"GL_LINE_TOKEN" },
274 { GL_LINE_WIDTH ,"GL_LINE_WIDTH" },
275 { GL_LINE_WIDTH_GRANULARITY ,"GL_LINE_WIDTH_GRANULARITY" },
276 { GL_LINE_WIDTH_RANGE ,"GL_LINE_WIDTH_RANGE" },
277 { GL_LIST_BASE ,"GL_LIST_BASE" },
278 { GL_LIST_INDEX ,"GL_LIST_INDEX" },
279 { GL_LIST_MODE ,"GL_LIST_MODE" },
280 { GL_LOAD ,"GL_LOAD" },
281 { GL_LOGIC_OP ,"GL_LOGIC_OP" },
282 { GL_LOGIC_OP_MODE ,"GL_LOGIC_OP_MODE" },
283 { GL_LUMINANCE ,"GL_LUMINANCE" },
284 { GL_LUMINANCE_ALPHA ,"GL_LUMINANCE_ALPHA" },
285 { GL_MAP1_COLOR_4 ,"GL_MAP1_COLOR_4" },
286 { GL_MAP1_GRID_DOMAIN ,"GL_MAP1_GRID_DOMAIN" },
287 { GL_MAP1_GRID_SEGMENTS ,"GL_MAP1_GRID_SEGMENTS" },
288 { GL_MAP1_INDEX ,"GL_MAP1_INDEX" },
289 { GL_MAP1_NORMAL ,"GL_MAP1_NORMAL" },
290 { GL_MAP1_TEXTURE_COORD_1 ,"GL_MAP1_TEXTURE_COORD_1" },
291 { GL_MAP1_TEXTURE_COORD_2 ,"GL_MAP1_TEXTURE_COORD_2" },
292 { GL_MAP1_TEXTURE_COORD_3 ,"GL_MAP1_TEXTURE_COORD_3" },
293 { GL_MAP1_TEXTURE_COORD_4 ,"GL_MAP1_TEXTURE_COORD_4" },
294 { GL_MAP1_VERTEX_3 ,"GL_MAP1_VERTEX_3" },
295 { GL_MAP1_VERTEX_4 ,"GL_MAP1_VERTEX_4" },
296 { GL_MAP2_COLOR_4 ,"GL_MAP2_COLOR_4" },
297 { GL_MAP2_GRID_DOMAIN ,"GL_MAP2_GRID_DOMAIN" },
298 { GL_MAP2_GRID_SEGMENTS ,"GL_MAP2_GRID_SEGMENTS" },
299 { GL_MAP2_INDEX ,"GL_MAP2_INDEX" },
300 { GL_MAP2_NORMAL ,"GL_MAP2_NORMAL" },
301 { GL_MAP2_TEXTURE_COORD_1 ,"GL_MAP2_TEXTURE_COORD_1" },
302 { GL_MAP2_TEXTURE_COORD_2 ,"GL_MAP2_TEXTURE_COORD_2" },
303 { GL_MAP2_TEXTURE_COORD_3 ,"GL_MAP2_TEXTURE_COORD_3" },
304 { GL_MAP2_TEXTURE_COORD_4 ,"GL_MAP2_TEXTURE_COORD_4" },
305 { GL_MAP2_VERTEX_3 ,"GL_MAP2_VERTEX_3" },
306 { GL_MAP2_VERTEX_4 ,"GL_MAP2_VERTEX_4" },
307 { GL_MAP_COLOR ,"GL_MAP_COLOR" },
308 { GL_MAP_STENCIL ,"GL_MAP_STENCIL" },
309 { GL_MATRIX_MODE ,"GL_MATRIX_MODE" },
310 { GL_MAX_ATTRIB_STACK_DEPTH ,"GL_MAX_ATTRIB_STACK_DEPTH" },
311 { GL_MAX_CLIP_PLANES ,"GL_MAX_CLIP_PLANES" },
312 { GL_MAX_EVAL_ORDER ,"GL_MAX_EVAL_ORDER" },
314 { GL_MAX_EXT ,"GL_MAX_EXT" },
316 { GL_MAX_LIGHTS ,"GL_MAX_LIGHTS" },
317 { GL_MAX_LIST_NESTING ,"GL_MAX_LIST_NESTING" },
318 { GL_MAX_MODELVIEW_STACK_DEPTH,"GL_MAX_MODELVIEW_STACK_DEPTH" },
319 { GL_MAX_NAME_STACK_DEPTH ,"GL_MAX_NAME_STACK_DEPTH" },
320 { GL_MAX_PIXEL_MAP_TABLE ,"GL_MAX_PIXEL_MAP_TABLE" },
321 { GL_MAX_PROJECTION_STACK_DEPTH,"GL_MAX_PROJECTION_STACK_DEPTH" },
322 { GL_MAX_TEXTURE_SIZE ,"GL_MAX_TEXTURE_SIZE" },
323 { GL_MAX_TEXTURE_STACK_DEPTH ,"GL_MAX_TEXTURE_STACK_DEPTH" },
324 { GL_MAX_VIEWPORT_DIMS ,"GL_MAX_VIEWPORT_DIMS" },
326 { GL_MIN_EXT ,"GL_MIN_EXT" },
328 { GL_MODELVIEW ,"GL_MODELVIEW" },
329 { GL_MODELVIEW_MATRIX ,"GL_MODELVIEW_MATRIX" },
330 { GL_MODELVIEW_STACK_DEPTH ,"GL_MODELVIEW_STACK_DEPTH" },
331 { GL_MODULATE ,"GL_MODULATE" },
332 { GL_MULT ,"GL_MULT" },
333 { GL_NAME_STACK_DEPTH ,"GL_NAME_STACK_DEPTH" },
334 { GL_NAND ,"GL_NAND" },
335 { GL_NEAREST ,"GL_NEAREST" },
336 { GL_NEAREST_MIPMAP_LINEAR ,"GL_NEAREST_MIPMAP_LINEAR" },
337 { GL_NEAREST_MIPMAP_NEAREST ,"GL_NEAREST_MIPMAP_NEAREST" },
338 { GL_NEVER ,"GL_NEVER" },
339 { GL_NICEST ,"GL_NICEST" },
340 { GL_NOOP ,"GL_NOOP" },
341 { GL_NOR ,"GL_NOR" },
342 { GL_NORMALIZE ,"GL_NORMALIZE" },
343 #ifdef GL_NORMAL_ARRAY_EXT
344 { GL_NORMAL_ARRAY_COUNT_EXT ,"GL_NORMAL_ARRAY_COUNT_EXT" },
345 { GL_NORMAL_ARRAY_EXT ,"GL_NORMAL_ARRAY_EXT" },
346 { GL_NORMAL_ARRAY_POINTER_EXT ,"GL_NORMAL_ARRAY_POINTER_EXT" },
347 { GL_NORMAL_ARRAY_STRIDE_EXT ,"GL_NORMAL_ARRAY_STRIDE_EXT" },
348 { GL_NORMAL_ARRAY_TYPE_EXT ,"GL_NORMAL_ARRAY_TYPE_EXT" },
350 { GL_NOTEQUAL ,"GL_NOTEQUAL" },
351 { GL_OBJECT_LINEAR ,"GL_OBJECT_LINEAR" },
352 { GL_OBJECT_PLANE ,"GL_OBJECT_PLANE" },
353 #ifdef GL_ONE_MINUS_CONSTANT_ALPHA_EXT
354 { GL_ONE_MINUS_CONSTANT_ALPHA_EXT,"GL_ONE_MINUS_CONSTANT_ALPHA_EXT" },
355 { GL_ONE_MINUS_CONSTANT_COLOR_EXT,"GL_ONE_MINUS_CONSTANT_COLOR_EXT" },
357 { GL_ONE_MINUS_DST_ALPHA ,"GL_ONE_MINUS_DST_ALPHA" },
358 { GL_ONE_MINUS_DST_COLOR ,"GL_ONE_MINUS_DST_COLOR" },
359 { GL_ONE_MINUS_SRC_ALPHA ,"GL_ONE_MINUS_SRC_ALPHA" },
360 { GL_ONE_MINUS_SRC_COLOR ,"GL_ONE_MINUS_SRC_COLOR" },
362 { GL_ORDER ,"GL_ORDER" },
363 { GL_OR_INVERTED ,"GL_OR_INVERTED" },
364 { GL_OR_REVERSE ,"GL_OR_REVERSE" },
365 { GL_OUT_OF_MEMORY ,"GL_OUT_OF_MEMORY" },
366 { GL_PACK_ALIGNMENT ,"GL_PACK_ALIGNMENT" },
367 { GL_PACK_LSB_FIRST ,"GL_PACK_LSB_FIRST" },
368 { GL_PACK_ROW_LENGTH ,"GL_PACK_ROW_LENGTH" },
369 { GL_PACK_SKIP_PIXELS ,"GL_PACK_SKIP_PIXELS" },
370 { GL_PACK_SKIP_ROWS ,"GL_PACK_SKIP_ROWS" },
371 { GL_PACK_SWAP_BYTES ,"GL_PACK_SWAP_BYTES" },
372 { GL_PASS_THROUGH_TOKEN ,"GL_PASS_THROUGH_TOKEN" },
373 { GL_PERSPECTIVE_CORRECTION_HINT,"GL_PERSPECTIVE_CORRECTION_HINT" },
374 { GL_PIXEL_MAP_A_TO_A ,"GL_PIXEL_MAP_A_TO_A" },
375 { GL_PIXEL_MAP_A_TO_A_SIZE ,"GL_PIXEL_MAP_A_TO_A_SIZE" },
376 { GL_PIXEL_MAP_B_TO_B ,"GL_PIXEL_MAP_B_TO_B" },
377 { GL_PIXEL_MAP_B_TO_B_SIZE ,"GL_PIXEL_MAP_B_TO_B_SIZE" },
378 { GL_PIXEL_MAP_G_TO_G ,"GL_PIXEL_MAP_G_TO_G" },
379 { GL_PIXEL_MAP_G_TO_G_SIZE ,"GL_PIXEL_MAP_G_TO_G_SIZE" },
380 { GL_PIXEL_MAP_I_TO_A ,"GL_PIXEL_MAP_I_TO_A" },
381 { GL_PIXEL_MAP_I_TO_A_SIZE ,"GL_PIXEL_MAP_I_TO_A_SIZE" },
382 { GL_PIXEL_MAP_I_TO_B ,"GL_PIXEL_MAP_I_TO_B" },
383 { GL_PIXEL_MAP_I_TO_B_SIZE ,"GL_PIXEL_MAP_I_TO_B_SIZE" },
384 { GL_PIXEL_MAP_I_TO_G ,"GL_PIXEL_MAP_I_TO_G" },
385 { GL_PIXEL_MAP_I_TO_G_SIZE ,"GL_PIXEL_MAP_I_TO_G_SIZE" },
386 { GL_PIXEL_MAP_I_TO_I ,"GL_PIXEL_MAP_I_TO_I" },
387 { GL_PIXEL_MAP_I_TO_I_SIZE ,"GL_PIXEL_MAP_I_TO_I_SIZE" },
388 { GL_PIXEL_MAP_I_TO_R ,"GL_PIXEL_MAP_I_TO_R" },
389 { GL_PIXEL_MAP_I_TO_R_SIZE ,"GL_PIXEL_MAP_I_TO_R_SIZE" },
390 { GL_PIXEL_MAP_R_TO_R ,"GL_PIXEL_MAP_R_TO_R" },
391 { GL_PIXEL_MAP_R_TO_R_SIZE ,"GL_PIXEL_MAP_R_TO_R_SIZE" },
392 { GL_PIXEL_MAP_S_TO_S ,"GL_PIXEL_MAP_S_TO_S" },
393 { GL_PIXEL_MAP_S_TO_S_SIZE ,"GL_PIXEL_MAP_S_TO_S_SIZE" },
394 { GL_POINT ,"GL_POINT" },
395 { GL_POINT_SIZE ,"GL_POINT_SIZE" },
396 { GL_POINT_SIZE_GRANULARITY ,"GL_POINT_SIZE_GRANULARITY" },
397 { GL_POINT_SIZE_RANGE ,"GL_POINT_SIZE_RANGE" },
398 { GL_POINT_SMOOTH ,"GL_POINT_SMOOTH" },
399 { GL_POINT_SMOOTH_HINT ,"GL_POINT_SMOOTH_HINT" },
400 { GL_POINT_TOKEN ,"GL_POINT_TOKEN" },
401 { GL_POLYGON ,"GL_POLYGON" },
402 { GL_POLYGON_MODE ,"GL_POLYGON_MODE" },
403 { GL_POLYGON_SMOOTH ,"GL_POLYGON_SMOOTH" },
404 { GL_POLYGON_SMOOTH_HINT ,"GL_POLYGON_SMOOTH_HINT" },
405 { GL_POLYGON_STIPPLE ,"GL_POLYGON_STIPPLE" },
406 #ifdef GL_POLYGON_OFFSET_EXT
407 { GL_POLYGON_OFFSET_BIAS_EXT ,"GL_POLYGON_OFFSET_BIAS_EXT" },
408 { GL_POLYGON_OFFSET_EXT ,"GL_POLYGON_OFFSET_EXT" },
409 { GL_POLYGON_OFFSET_FACTOR_EXT,"GL_POLYGON_OFFSET_FACTOR_EXT" },
411 { GL_POLYGON_TOKEN ,"GL_POLYGON_TOKEN" },
412 { GL_POSITION ,"GL_POSITION" },
413 { GL_PROJECTION ,"GL_PROJECTION" },
414 { GL_PROJECTION_MATRIX ,"GL_PROJECTION_MATRIX" },
415 { GL_PROJECTION_STACK_DEPTH ,"GL_PROJECTION_STACK_DEPTH" },
417 { GL_QUADRATIC_ATTENUATION ,"GL_QUADRATIC_ATTENUATION" },
418 { GL_QUADS ,"GL_QUADS" },
419 { GL_QUAD_STRIP ,"GL_QUAD_STRIP" },
421 { GL_READ_BUFFER ,"GL_READ_BUFFER" },
422 { GL_RED ,"GL_RED" },
423 { GL_RED_BIAS ,"GL_RED_BIAS" },
424 { GL_RED_BITS ,"GL_RED_BITS" },
425 { GL_RED_SCALE ,"GL_RED_SCALE" },
426 { GL_RENDER ,"GL_RENDER" },
427 { GL_RENDERER ,"GL_RENDERER" },
428 { GL_RENDER_MODE ,"GL_RENDER_MODE" },
429 { GL_REPEAT ,"GL_REPEAT" },
430 { GL_REPLACE ,"GL_REPLACE" },
431 #ifdef GL_REPLACE_EXT
432 { GL_REPLACE_EXT ,"GL_REPLACE_EXT" },
434 { GL_RETURN ,"GL_RETURN" },
435 { GL_RGB ,"GL_RGB" },
436 { GL_RGBA ,"GL_RGBA" },
437 { GL_RGBA_MODE ,"GL_RGBA_MODE" },
438 { GL_RIGHT ,"GL_RIGHT" },
440 { GL_SCISSOR_BOX ,"GL_SCISSOR_BOX" },
441 { GL_SCISSOR_TEST ,"GL_SCISSOR_TEST" },
442 { GL_SELECT ,"GL_SELECT" },
443 { GL_SET ,"GL_SET" },
444 { GL_SHADE_MODEL ,"GL_SHADE_MODEL" },
445 { GL_SHININESS ,"GL_SHININESS" },
446 { GL_SHORT ,"GL_SHORT" },
447 { GL_SMOOTH ,"GL_SMOOTH" },
448 { GL_SPECULAR ,"GL_SPECULAR" },
449 { GL_SPHERE_MAP ,"GL_SPHERE_MAP" },
450 { GL_SPOT_CUTOFF ,"GL_SPOT_CUTOFF" },
451 { GL_SPOT_DIRECTION ,"GL_SPOT_DIRECTION" },
452 { GL_SPOT_EXPONENT ,"GL_SPOT_EXPONENT" },
453 { GL_SRC_ALPHA ,"GL_SRC_ALPHA" },
454 { GL_SRC_ALPHA_SATURATE ,"GL_SRC_ALPHA_SATURATE" },
455 { GL_SRC_COLOR ,"GL_SRC_COLOR" },
456 { GL_STACK_OVERFLOW ,"GL_STACK_OVERFLOW" },
457 { GL_STACK_UNDERFLOW ,"GL_STACK_UNDERFLOW" },
458 { GL_STENCIL ,"GL_STENCIL" },
459 { GL_STENCIL_BITS ,"GL_STENCIL_BITS" },
460 { GL_STENCIL_CLEAR_VALUE ,"GL_STENCIL_CLEAR_VALUE" },
461 { GL_STENCIL_FAIL ,"GL_STENCIL_FAIL" },
462 { GL_STENCIL_FUNC ,"GL_STENCIL_FUNC" },
463 { GL_STENCIL_INDEX ,"GL_STENCIL_INDEX" },
464 { GL_STENCIL_PASS_DEPTH_FAIL ,"GL_STENCIL_PASS_DEPTH_FAIL" },
465 { GL_STENCIL_PASS_DEPTH_PASS ,"GL_STENCIL_PASS_DEPTH_PASS" },
466 { GL_STENCIL_REF ,"GL_STENCIL_REF" },
467 { GL_STENCIL_TEST ,"GL_STENCIL_TEST" },
468 { GL_STENCIL_VALUE_MASK ,"GL_STENCIL_VALUE_MASK" },
469 { GL_STENCIL_WRITEMASK ,"GL_STENCIL_WRITEMASK" },
470 { GL_STEREO ,"GL_STEREO" },
471 { GL_SUBPIXEL_BITS ,"GL_SUBPIXEL_BITS" },
473 { GL_TEXTURE ,"GL_TEXTURE" },
474 { GL_TEXTURE_1D ,"GL_TEXTURE_1D" },
475 { GL_TEXTURE_2D ,"GL_TEXTURE_2D" },
476 { GL_TEXTURE_BORDER ,"GL_TEXTURE_BORDER" },
477 { GL_TEXTURE_BORDER_COLOR ,"GL_TEXTURE_BORDER_COLOR" },
478 { GL_TEXTURE_COMPONENTS ,"GL_TEXTURE_COMPONENTS" },
479 #ifdef GL_TEXTURE_COORD_ARRAY_EXT
480 { GL_TEXTURE_COORD_ARRAY_COUNT_EXT,"GL_TEXTURE_COORD_ARRAY_COUNT_EXT" },
481 { GL_TEXTURE_COORD_ARRAY_EXT ,"GL_TEXTURE_COORD_ARRAY_EXT" },
482 { GL_TEXTURE_COORD_ARRAY_POINTER_EXT,"GL_TEXTURE_COORD_ARRAY_POINTER_EXT" },
483 { GL_TEXTURE_COORD_ARRAY_SIZE_EXT,"GL_TEXTURE_COORD_ARRAY_SIZE_EXT" },
484 { GL_TEXTURE_COORD_ARRAY_STRIDE_EXT,"GL_TEXTURE_COORD_ARRAY_STRIDE_EXT" },
485 { GL_TEXTURE_COORD_ARRAY_TYPE_EXT,"GL_TEXTURE_COORD_ARRAY_TYPE_EXT" },
487 { GL_TEXTURE_ENV ,"GL_TEXTURE_ENV" },
488 { GL_TEXTURE_ENV_COLOR ,"GL_TEXTURE_ENV_COLOR" },
489 { GL_TEXTURE_ENV_MODE ,"GL_TEXTURE_ENV_MODE" },
490 { GL_TEXTURE_GEN_MODE ,"GL_TEXTURE_GEN_MODE" },
491 { GL_TEXTURE_GEN_Q ,"GL_TEXTURE_GEN_Q" },
492 { GL_TEXTURE_GEN_R ,"GL_TEXTURE_GEN_R" },
493 { GL_TEXTURE_GEN_S ,"GL_TEXTURE_GEN_S" },
494 { GL_TEXTURE_GEN_T ,"GL_TEXTURE_GEN_T" },
495 { GL_TEXTURE_HEIGHT ,"GL_TEXTURE_HEIGHT" },
496 { GL_TEXTURE_MAG_FILTER ,"GL_TEXTURE_MAG_FILTER" },
497 { GL_TEXTURE_MATRIX ,"GL_TEXTURE_MATRIX" },
498 { GL_TEXTURE_MIN_FILTER ,"GL_TEXTURE_MIN_FILTER" },
499 { GL_TEXTURE_STACK_DEPTH ,"GL_TEXTURE_STACK_DEPTH" },
500 { GL_TEXTURE_WIDTH ,"GL_TEXTURE_WIDTH" },
501 { GL_TEXTURE_WRAP_S ,"GL_TEXTURE_WRAP_S" },
502 { GL_TEXTURE_WRAP_T ,"GL_TEXTURE_WRAP_T" },
503 { GL_TRIANGLES ,"GL_TRIANGLES" },
504 { GL_TRIANGLE_FAN ,"GL_TRIANGLE_FAN" },
505 { GL_TRIANGLE_STRIP ,"GL_TRIANGLE_STRIP" },
506 { GL_UNPACK_ALIGNMENT ,"GL_UNPACK_ALIGNMENT" },
507 { GL_UNPACK_LSB_FIRST ,"GL_UNPACK_LSB_FIRST" },
508 { GL_UNPACK_ROW_LENGTH ,"GL_UNPACK_ROW_LENGTH" },
509 { GL_UNPACK_SKIP_PIXELS ,"GL_UNPACK_SKIP_PIXELS" },
510 { GL_UNPACK_SKIP_ROWS ,"GL_UNPACK_SKIP_ROWS" },
511 { GL_UNPACK_SWAP_BYTES ,"GL_UNPACK_SWAP_BYTES" },
512 { GL_UNSIGNED_BYTE ,"GL_UNSIGNED_BYTE" },
513 { GL_UNSIGNED_INT ,"GL_UNSIGNED_INT" },
514 { GL_UNSIGNED_SHORT ,"GL_UNSIGNED_SHORT" },
515 { GL_VENDOR ,"GL_VENDOR" },
516 { GL_VERSION ,"GL_VERSION" },
517 #ifdef GL_VERTEX_ARRAY_EXT
518 { GL_VERTEX_ARRAY_COUNT_EXT ,"GL_VERTEX_ARRAY_COUNT_EXT" },
519 { GL_VERTEX_ARRAY_EXT ,"GL_VERTEX_ARRAY_EXT" },
520 { GL_VERTEX_ARRAY_POINTER_EXT ,"GL_VERTEX_ARRAY_POINTER_EXT" },
521 { GL_VERTEX_ARRAY_SIZE_EXT ,"GL_VERTEX_ARRAY_SIZE_EXT" },
522 { GL_VERTEX_ARRAY_STRIDE_EXT ,"GL_VERTEX_ARRAY_STRIDE_EXT" },
523 { GL_VERTEX_ARRAY_TYPE_EXT ,"GL_VERTEX_ARRAY_TYPE_EXT" },
525 { GL_VIEWPORT ,"GL_VIEWPORT" },
526 { GL_XOR ,"GL_XOR" },
527 { GL_ZOOM_X ,"GL_ZOOM_X" },
528 { GL_ZOOM_Y ,"GL_ZOOM_Y" },
530 /* Magic end-marker - do not remove! */
535 int xglTraceIsEnabled ( char *gl_function_name )
537 static int frameno = 0 ;
538 static int countdown = 0 ;
540 if ( strcmp ( gl_function_name, "glutSwapBuffers" ) == 0 )
542 if ( countdown == 0 )
546 fprintf ( stderr, "\nContinue Tracing after frame %d [Yes,No,Countdown,eXit] ?", ++frameno ) ;
552 xglTraceOn = ( s[0] != 'n' && s[0] != 'c' ) ;
556 fprintf ( stderr, "\nHow many frames should I wait until I ask again?" ) ;
558 countdown = atoi(s) ;
561 fprintf ( xglTraceFd, "/* Frame %d - tracing %s */\n", frameno, xglTraceOn ? "ON" : "OFF" ) ;
571 int xglExecuteIsEnabled ( char *gl_function_name )
576 char *xglExpandGLenum ( GLenum x )
578 static GLenum last_val = GL_NONE ;
579 static char *last_str = NULL ;
583 /* Due to ambiguity - these are output as numbers...
585 GL_NONE = , GL_ZERO = GL_FALSE = GL_POINTS = 0
586 GL_ONE = , GL_TRUE = GL_LINES = 1
589 if ( (int) x == 0 ) return "(GLenum) 0" ;
590 if ( (int) x == 1 ) return "(GLenum) 1" ;
592 if ( last_val == x ) return last_str ;
594 for ( i = 0 ; glenum_string [i].name != NULL ; i++ )
595 if ( glenum_string [i].val == x )
596 return glenum_string [i].name ;
599 WARNING - this will leak memory - but it is an error condition,
600 so I suppose it's acceptable.
601 You can't declare the 'error_message' string as a
602 static - or else double errors will go mis-reported.
605 error_message = (char *)malloc( 100 * sizeof(char) ) ;
607 sprintf ( error_message, "(GLenum) 0x%04x /* Illegal? */", (int) x ) ;
609 return error_message ;
612 static GLbyte b1 [ 1 ], b2 [ 2 ], b3 [ 3 ], b4 [ 4 ] ;
613 static GLdouble d1 [ 1 ], d2 [ 2 ], d3 [ 3 ], d4 [ 4 ] ;
614 static GLfloat f1 [ 1 ], f2 [ 2 ], f3 [ 3 ], f4 [ 4 ] ;
615 static GLint i1 [ 1 ], i2 [ 2 ], i3 [ 3 ], i4 [ 4 ] ;
616 static GLshort s1 [ 1 ], s2 [ 2 ], s3 [ 3 ], s4 [ 4 ] ;
617 static GLubyte ub1 [ 1 ], ub2 [ 2 ], ub3 [ 3 ], ub4 [ 4 ] ;
618 static GLuint ui1 [ 1 ], ui2 [ 2 ], ui3 [ 3 ], ui4 [ 4 ] ;
619 static GLushort us1 [ 1 ], us2 [ 2 ], us3 [ 3 ], us4 [ 4 ] ;
621 static GLdouble md [ 16 ] ;
622 static GLfloat mf [ 16 ] ;
624 GLdouble *xglBuild1dv ( GLdouble v ) { d1[0] = v ; return d1 ; }
625 GLfloat *xglBuild1fv ( GLfloat v ) { f1[0] = v ; return f1 ; }
626 GLbyte *xglBuild1bv ( GLbyte v ) { b1[0] = v ; return b1 ; }
627 GLint *xglBuild1iv ( GLint v ) { i1[0] = v ; return i1 ; }
628 GLshort *xglBuild1sv ( GLshort v ) { s1[0] = v ; return s1 ; }
629 GLubyte *xglBuild1ubv ( GLubyte v ) { ub1[0] = v ; return ub1 ; }
630 GLuint *xglBuild1uiv ( GLuint v ) { ui1[0] = v ; return ui1 ; }
631 GLushort *xglBuild1usv ( GLushort v ) { us1[0] = v ; return us1 ; }
633 GLdouble *xglBuild2dv ( GLdouble v0, GLdouble v1 ) { d2[0] = v0 ; d2[1] = v1 ; return d2 ; }
634 GLfloat *xglBuild2fv ( GLfloat v0, GLfloat v1 ) { f2[0] = v0 ; f2[1] = v1 ; return f2 ; }
635 GLbyte *xglBuild2bv ( GLbyte v0, GLbyte v1 ) { b2[0] = v0 ; b2[1] = v1 ; return b2 ; }
636 GLint *xglBuild2iv ( GLint v0, GLint v1 ) { i2[0] = v0 ; i2[1] = v1 ; return i2 ; }
637 GLshort *xglBuild2sv ( GLshort v0, GLshort v1 ) { s2[0] = v0 ; s2[1] = v1 ; return s2 ; }
638 GLubyte *xglBuild2ubv ( GLubyte v0, GLubyte v1 ) { ub2[0] = v0 ; ub2[1] = v1 ; return ub2 ; }
639 GLuint *xglBuild2uiv ( GLuint v0, GLuint v1 ) { ui2[0] = v0 ; ui2[1] = v1 ; return ui2 ; }
640 GLushort *xglBuild2usv ( GLushort v0, GLushort v1 ) { us2[0] = v0 ; us2[1] = v1 ; return us2 ; }
642 GLdouble *xglBuild3dv ( GLdouble v0, GLdouble v1, GLdouble v2 ) { d3[0] = v0 ; d3[1] = v1 ; d3[2] = v2 ; return d3 ; }
643 GLfloat *xglBuild3fv ( GLfloat v0, GLfloat v1, GLfloat v2 ) { f3[0] = v0 ; f3[1] = v1 ; f3[2] = v2 ; return f3 ; }
644 GLbyte *xglBuild3bv ( GLbyte v0, GLbyte v1, GLbyte v2 ) { b3[0] = v0 ; b3[1] = v1 ; b3[2] = v2 ; return b3 ; }
645 GLint *xglBuild3iv ( GLint v0, GLint v1, GLint v2 ) { i3[0] = v0 ; i3[1] = v1 ; i3[2] = v2 ; return i3 ; }
646 GLshort *xglBuild3sv ( GLshort v0, GLshort v1, GLshort v2 ) { s3[0] = v0 ; s3[1] = v1 ; s3[2] = v2 ; return s3 ; }
647 GLubyte *xglBuild3ubv ( GLubyte v0, GLubyte v1, GLubyte v2 ) { ub3[0] = v0 ; ub3[1] = v1 ; ub3[2] = v2 ; return ub3 ; }
648 GLuint *xglBuild3uiv ( GLuint v0, GLuint v1, GLuint v2 ) { ui3[0] = v0 ; ui3[1] = v1 ; ui3[2] = v2 ; return ui3 ; }
649 GLushort *xglBuild3usv ( GLushort v0, GLushort v1, GLushort v2 ) { us3[0] = v0 ; us3[1] = v1 ; us3[2] = v2 ; return us3 ; }
652 GLdouble *xglBuild4dv ( GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3 ) { d4[0] = v0 ; d4[1] = v1 ; d4[2] = v2 ; d4[3] = v3 ; return d4 ; }
653 GLfloat *xglBuild4fv ( GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3 ) { f4[0] = v0 ; f4[1] = v1 ; f4[2] = v2 ; f4[3] = v3 ; return f4 ; }
654 GLbyte *xglBuild4bv ( GLbyte v0, GLbyte v1, GLbyte v2, GLbyte v3 ) { b4[0] = v0 ; b4[1] = v1 ; b4[2] = v2 ; b4[3] = v3 ; return b4 ; }
655 GLint *xglBuild4iv ( GLint v0, GLint v1, GLint v2, GLint v3 ) { i4[0] = v0 ; i4[1] = v1 ; i4[2] = v2 ; i4[3] = v3 ; return i4 ; }
656 GLshort *xglBuild4sv ( GLshort v0, GLshort v1, GLshort v2, GLshort v3 ) { s4[0] = v0 ; s4[1] = v1 ; s4[2] = v2 ; s4[3] = v3 ; return s4 ; }
657 GLubyte *xglBuild4ubv ( GLubyte v0, GLubyte v1, GLubyte v2, GLubyte v3 ) { ub4[0] = v0 ; ub4[1] = v1 ; ub4[2] = v2 ; ub4[3] = v3 ; return ub4 ; }
658 GLuint *xglBuild4uiv ( GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) { ui4[0] = v0 ; ui4[1] = v1 ; ui4[2] = v2 ; ui4[3] = v3 ; return ui4 ; }
659 GLushort *xglBuild4usv ( GLushort v0, GLushort v1, GLushort v2, GLushort v3 ) { us4[0] = v0 ; us4[1] = v1 ; us4[2] = v2 ; us4[3] = v3 ; return us4 ; }
661 GLdouble *xglBuildMatrixd ( GLdouble m0 , GLdouble m1 , GLdouble m2 , GLdouble m3 ,
662 GLdouble m4 , GLdouble m5 , GLdouble m6 , GLdouble m7 ,
663 GLdouble m8 , GLdouble m9 , GLdouble m10, GLdouble m11,
664 GLdouble m12, GLdouble m13, GLdouble m14, GLdouble m15 )
666 md[ 0] = m0 ; md[ 1] = m1 ; md[ 2] = m2 ; md[ 3] = m3 ;
667 md[ 4] = m4 ; md[ 5] = m5 ; md[ 6] = m6 ; md[ 7] = m7 ;
668 md[ 8] = m8 ; md[ 9] = m9 ; md[10] = m10 ; md[11] = m11 ;
669 md[12] = m12 ; md[13] = m13 ; md[14] = m14 ; md[15] = m15 ;
675 GLfloat *xglBuildMatrixf ( GLfloat m0 , GLfloat m1 , GLfloat m2 , GLfloat m3 ,
676 GLfloat m4 , GLfloat m5 , GLfloat m6 , GLfloat m7 ,
677 GLfloat m8 , GLfloat m9 , GLfloat m10, GLfloat m11,
678 GLfloat m12, GLfloat m13, GLfloat m14, GLfloat m15 )
680 mf[ 0] = m0 ; mf[ 1] = m1 ; mf[ 2] = m2 ; mf[ 3] = m3 ;
681 mf[ 4] = m4 ; mf[ 5] = m5 ; mf[ 6] = m6 ; mf[ 7] = m7 ;
682 mf[ 8] = m8 ; mf[ 9] = m9 ; mf[10] = m10 ; mf[11] = m11 ;
683 mf[12] = m12 ; mf[13] = m13 ; mf[14] = m14 ; mf[15] = m15 ;