1 /* $XFree86: xc/lib/GL/glx/g_render.c,v 1.8 2004/01/28 18:11:38 alanh Exp $ */
3 ** License Applicability. Except to the extent portions of this file are
4 ** made subject to an alternative license as permitted in the SGI Free
5 ** Software License B, Version 1.1 (the "License"), the contents of this
6 ** file are subject only to the provisions of the License. You may not use
7 ** this file except in compliance with the License. You may obtain a copy
8 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
9 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
11 ** http://oss.sgi.com/projects/FreeB
13 ** Note that, as provided in the License, the Software is distributed on an
14 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
15 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
16 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
17 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
19 ** Original Code. The Original Code is: OpenGL Sample Implementation,
20 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
21 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
22 ** Copyright in any portions created by third parties is as indicated
23 ** elsewhere herein. All Rights Reserved.
25 ** Additional Notice Provisions: This software was created using the
26 ** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
27 ** not been independently verified as being compliant with the OpenGL(R)
28 ** version 1.2.1 Specification.
31 #include "packrender.h"
35 #define GLdouble_SIZE 8
36 #define GLclampd_SIZE 8
37 #define GLfloat_SIZE 4
38 #define GLclampf_SIZE 4
42 #define GLbitfield_SIZE 4
43 #define GLshort_SIZE 2
44 #define GLushort_SIZE 2
46 #define GLubyte_SIZE 1
47 #define GLboolean_SIZE 1
49 #define __GLX_PUT_GLdouble(offset,value) __GLX_PUT_DOUBLE(offset,value)
50 #define __GLX_PUT_GLclampd(offset,value) __GLX_PUT_DOUBLE(offset,value)
51 #define __GLX_PUT_GLfloat(offset,value) __GLX_PUT_FLOAT(offset,value)
52 #define __GLX_PUT_GLclampf(offset,value) __GLX_PUT_FLOAT(offset,value)
53 #define __GLX_PUT_GLint(offset,value) __GLX_PUT_LONG(offset,value)
54 #define __GLX_PUT_GLuint(offset,value) __GLX_PUT_LONG(offset,value)
55 #define __GLX_PUT_GLenum(offset,value) __GLX_PUT_LONG(offset,value)
56 #define __GLX_PUT_GLbitfield(offset,value) __GLX_PUT_LONG(offset,value)
57 #define __GLX_PUT_GLshort(offset,value) __GLX_PUT_SHORT(offset,value)
58 #define __GLX_PUT_GLushort(offset,value) __GLX_PUT_SHORT(offset,value)
59 #define __GLX_PUT_GLbyte(offset,value) __GLX_PUT_CHAR(offset,value)
60 #define __GLX_PUT_GLubyte(offset,value) __GLX_PUT_CHAR(offset,value)
61 #define __GLX_PUT_GLboolean(offset,value) __GLX_PUT_CHAR(offset,value)
63 #define __GLX_PUT_GLdouble_ARRAY(offset,ptr,count) __GLX_PUT_DOUBLE_ARRAY(offset,ptr,count)
64 #define __GLX_PUT_GLclampd_ARRAY(offset,ptr,count) __GLX_PUT_DOUBLE_ARRAY(offset,ptr,count)
65 #define __GLX_PUT_GLfloat_ARRAY(offset,ptr,count) __GLX_PUT_FLOAT_ARRAY(offset,ptr,count)
66 #define __GLX_PUT_GLclampf_ARRAY(offset,ptr,count) __GLX_PUT_FLOAT_ARRAY(offset,ptr,count)
67 #define __GLX_PUT_GLint_ARRAY(offset,ptr,count) __GLX_PUT_LONG_ARRAY(offset,ptr,count)
68 #define __GLX_PUT_GLuint_ARRAY(offset,ptr,count) __GLX_PUT_LONG_ARRAY(offset,ptr,count)
69 #define __GLX_PUT_GLenum_ARRAY(offset,ptr,count) __GLX_PUT_LONG_ARRAY(offset,ptr,count)
70 #define __GLX_PUT_GLshort_ARRAY(offset,ptr,count) __GLX_PUT_SHORT_ARRAY(offset,ptr,count)
71 #define __GLX_PUT_GLushort_ARRAY(offset,ptr,count) __GLX_PUT_SHORT_ARRAY(offset,ptr,count)
72 #define __GLX_PUT_GLbyte_ARRAY(offset,ptr,count) __GLX_PUT_CHAR_ARRAY(offset,ptr,count)
73 #define __GLX_PUT_GLubyte_ARRAY(offset,ptr,count) __GLX_PUT_CHAR_ARRAY(offset,ptr,count)
74 #define __GLX_PUT_GLboolean_ARRAY(offset,ptr,count) __GLX_PUT_CHAR_ARRAY(offset,ptr,count)
76 #define RENDER_SIZE(t,c) (__GLX_PAD(4 + (t ## _SIZE * c)))
78 /* GLX protocol templates are named in the following manner. All templates
79 * begin with the string 'glxproto_'. Following is an optional list of
80 * scalar parameters. The scalars are listed as type and number. The most
81 * common being \c enum1 (one scalar enum) and \c enum2 (two scalar enums).
83 * The final part of the name describes the number of named-type parameters
84 * and how they are passed.
85 * - One or more digits followed by the letter s means
86 * that the specified number of parameters are passed as scalars. The macro
87 * \c glxproto_3s generates a function that takes 3 scalars, such as
89 * - A capital C follwed by a lower-case v means that a constant
90 * sized vector is passed. Macros of this type take an extra parameter,
91 * which is the size of the vector. The invocation
92 * 'glxproto_Cv(Vertex3fv, X_GLrop_Vertexfv, GLfloat, 3)' would generate the
93 * correct protocol for the \c glVertex3fv function.
94 * - A capital V followed by a lower-case v means that a variable sized
95 * vector is passed. The function generated by these macros will call
96 * a co-function to determine the size of the vector. The name of the
97 * co-function is generated by prepending \c __gl and appending \c _size
98 * to the base name of the function. The invocation
99 * 'glxproto_enum1_Vv(Fogiv, X_GLrop_Fogiv, GLint)' would generate the
100 * correct protocol for the \c glFogiv function.
101 * - One or more digits without a following letter means that a function
102 * taking the specified number of scalar parameters and a function with a
103 * vector parameter of the specified size should be generated. The letter
104 * v is automatically appended to the name of the vector-based function in
105 * this case. The invocation
106 * 'glxproto_3(Vertex3f, X_GLrop_Vertex3fv, GLfloat)' would generate the
107 * correct protocol for both \c glVertex3f and \c glVertex3fv.
109 * glxproto_void is a special case for functions that take no parameters
112 * An addition form is 'glxvendr_'. This is identical to the other forms
113 * with the exception of taking an additional parameter (to the macro) which
114 * is a vendor string to append to the function name. The invocation
115 * 'glxproto_3(Foo3f, X_GLrop_Foo3fv, GLfloat)' would generate the functions
116 * 'glFoo3fv' and 'glFoo3f', and the invocation
117 * 'glxvendr_3(Foo3f, X_GLrop_Foo3fv, GLfloat, EXT)' would generate the
118 * functions 'glFoo3fvEXT' and 'glFoo3fEXT'.
121 #define glxproto_void(name, rop) \
122 void __indirect_gl ## name (void) \
124 __GLX_DECLARE_VARIABLES(); \
125 __GLX_LOAD_VARIABLES(); \
126 __GLX_BEGIN(rop, 4); \
130 #define glxproto_Cv(name, rop, type, count) \
131 void __indirect_gl ## name (const type * v) \
133 __GLX_DECLARE_VARIABLES(); \
134 __GLX_LOAD_VARIABLES(); \
135 cmdlen = RENDER_SIZE(type, count); \
136 __GLX_BEGIN(rop, cmdlen); \
138 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v[0]); \
139 if (count > 1) { __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v[1]); } \
140 if (count > 2) { __GLX_PUT_ ## type (4 + (2 * type ## _SIZE), v[2]); } \
141 if (count > 3) { __GLX_PUT_ ## type (4 + (3 * type ## _SIZE), v[3]); } \
143 __GLX_PUT_ ## type ## _ARRAY(4, v, count); \
148 #define glxproto_Cv_transpose(name, rop, type, w) \
149 void __indirect_gl ## name (const type * v) \
151 __GLX_DECLARE_VARIABLES(); \
152 type t[ w * w ]; unsigned i, j; \
153 for (i = 0; i < w; i++) { \
154 for (j = 0; j < w; j++) { \
155 t[i*w+j] = v[j*w+i]; \
158 __GLX_LOAD_VARIABLES(); \
159 cmdlen = RENDER_SIZE(type, (w * w)); \
160 __GLX_BEGIN(rop, cmdlen); \
161 __GLX_PUT_ ## type ## _ARRAY(4, t, (w * w)); \
165 #define glxproto_1s(name, rop, type) \
166 void __indirect_gl ## name (type v1) \
168 __GLX_DECLARE_VARIABLES(); \
169 __GLX_LOAD_VARIABLES(); \
170 cmdlen = RENDER_SIZE(type, 1); \
171 __GLX_BEGIN(rop, cmdlen); \
172 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v1); \
176 #define glxproto_2s(name, rop, type) \
177 void __indirect_gl ## name (type v1, type v2) \
179 __GLX_DECLARE_VARIABLES(); \
180 __GLX_LOAD_VARIABLES(); \
181 cmdlen = RENDER_SIZE(type, 2); \
182 __GLX_BEGIN(rop, cmdlen); \
183 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v1); \
184 __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v2); \
188 #define glxproto_3s(name, rop, type) \
189 void __indirect_gl ## name (type v1, type v2, type v3) \
191 __GLX_DECLARE_VARIABLES(); \
192 __GLX_LOAD_VARIABLES(); \
193 cmdlen = RENDER_SIZE(type, 3); \
194 __GLX_BEGIN(rop, cmdlen); \
195 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v1); \
196 __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v2); \
197 __GLX_PUT_ ## type (4 + (2 * type ## _SIZE), v3); \
201 #define glxproto_4s(name, rop, type) \
202 void __indirect_gl ## name (type v1, type v2, type v3, type v4) \
204 __GLX_DECLARE_VARIABLES(); \
205 __GLX_LOAD_VARIABLES(); \
206 cmdlen = RENDER_SIZE(type, 4); \
207 __GLX_BEGIN(rop, cmdlen); \
208 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v1); \
209 __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v2); \
210 __GLX_PUT_ ## type (4 + (2 * type ## _SIZE), v3); \
211 __GLX_PUT_ ## type (4 + (3 * type ## _SIZE), v4); \
215 #define glxproto_6s(name, rop, type) \
216 void __indirect_gl ## name (type v1, type v2, type v3, type v4, type v5, type v6) \
218 __GLX_DECLARE_VARIABLES(); \
219 __GLX_LOAD_VARIABLES(); \
220 cmdlen = RENDER_SIZE(type, 6); \
221 __GLX_BEGIN(rop, cmdlen); \
222 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v1); \
223 __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v2); \
224 __GLX_PUT_ ## type (4 + (2 * type ## _SIZE), v3); \
225 __GLX_PUT_ ## type (4 + (3 * type ## _SIZE), v4); \
226 __GLX_PUT_ ## type (4 + (4 * type ## _SIZE), v5); \
227 __GLX_PUT_ ## type (4 + (5 * type ## _SIZE), v6); \
231 #define glxproto_enum1_1s(name, rop, type) \
232 void __indirect_gl ## name (GLenum e, type v1) \
234 __GLX_DECLARE_VARIABLES(); \
235 __GLX_LOAD_VARIABLES(); \
236 cmdlen = 4 + RENDER_SIZE(type, 1); \
237 __GLX_BEGIN(rop, cmdlen); \
238 if (type ## _SIZE == 8) { \
239 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v1); \
240 __GLX_PUT_LONG (4 + (1 * type ## _SIZE), e); \
242 __GLX_PUT_LONG(4, e); \
243 __GLX_PUT_ ## type (8 + (0 * type ## _SIZE), v1); \
248 #define glxproto_enum1_1v(name, rop, type) \
249 void __indirect_gl ## name (GLenum e, const type * v) \
251 __GLX_DECLARE_VARIABLES(); \
252 __GLX_LOAD_VARIABLES(); \
253 cmdlen = 4 + RENDER_SIZE(type, 1); \
254 __GLX_BEGIN(rop, cmdlen); \
255 if (type ## _SIZE == 8) { \
256 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v[0]); \
257 __GLX_PUT_LONG (4 + (1 * type ## _SIZE), e); \
259 __GLX_PUT_LONG(4, e); \
260 __GLX_PUT_ ## type (8 + (0 * type ## _SIZE), v[0]); \
265 #define glxproto_enum1_2s(name, rop, type) \
266 void __indirect_gl ## name (GLenum e, type v1, type v2) \
268 __GLX_DECLARE_VARIABLES(); \
269 __GLX_LOAD_VARIABLES(); \
270 cmdlen = 4 + RENDER_SIZE(type, 2); \
271 __GLX_BEGIN(rop, cmdlen); \
272 if (type ## _SIZE == 8) { \
273 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v1); \
274 __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v2); \
275 __GLX_PUT_LONG (4 + (2 * type ## _SIZE), e); \
277 __GLX_PUT_LONG(4, e); \
278 __GLX_PUT_ ## type (8 + (0 * type ## _SIZE), v1); \
279 __GLX_PUT_ ## type (8 + (1 * type ## _SIZE), v2); \
284 #define glxproto_enum1_2v(name, rop, type) \
285 void __indirect_gl ## name (GLenum e, const type * v) \
287 __GLX_DECLARE_VARIABLES(); \
288 __GLX_LOAD_VARIABLES(); \
289 cmdlen = 4 + RENDER_SIZE(type, 2); \
290 __GLX_BEGIN(rop, cmdlen); \
291 if (type ## _SIZE == 8) { \
292 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v[0]); \
293 __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v[1]); \
294 __GLX_PUT_LONG (4 + (2 * type ## _SIZE), e); \
296 __GLX_PUT_LONG(4, e); \
297 __GLX_PUT_ ## type (8 + (0 * type ## _SIZE), v[0]); \
298 __GLX_PUT_ ## type (8 + (1 * type ## _SIZE), v[1]); \
303 #define glxproto_enum1_3s(name, rop, type) \
304 void __indirect_gl ## name (GLenum e, type v1, type v2, type v3) \
306 __GLX_DECLARE_VARIABLES(); \
307 __GLX_LOAD_VARIABLES(); \
308 cmdlen = 4 + RENDER_SIZE(type, 3); \
309 __GLX_BEGIN(rop, cmdlen); \
310 if (type ## _SIZE == 8) { \
311 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v1); \
312 __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v2); \
313 __GLX_PUT_ ## type (4 + (2 * type ## _SIZE), v3); \
314 __GLX_PUT_LONG (4 + (3 * type ## _SIZE), e); \
316 __GLX_PUT_LONG(4, e); \
317 __GLX_PUT_ ## type (8 + (0 * type ## _SIZE), v1); \
318 __GLX_PUT_ ## type (8 + (1 * type ## _SIZE), v2); \
319 __GLX_PUT_ ## type (8 + (2 * type ## _SIZE), v3); \
324 #define glxproto_enum1_3v(name, rop, type) \
325 void __indirect_gl ## name (GLenum e, const type * v) \
327 __GLX_DECLARE_VARIABLES(); \
328 __GLX_LOAD_VARIABLES(); \
329 cmdlen = 4 + RENDER_SIZE(type, 3); \
330 __GLX_BEGIN(rop, cmdlen); \
331 if (type ## _SIZE == 8) { \
332 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v[0]); \
333 __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v[1]); \
334 __GLX_PUT_ ## type (4 + (2 * type ## _SIZE), v[2]); \
335 __GLX_PUT_LONG (4 + (3 * type ## _SIZE), e); \
337 __GLX_PUT_LONG(4, e); \
338 __GLX_PUT_ ## type (8 + (0 * type ## _SIZE), v[0]); \
339 __GLX_PUT_ ## type (8 + (1 * type ## _SIZE), v[1]); \
340 __GLX_PUT_ ## type (8 + (2 * type ## _SIZE), v[2]); \
345 #define glxproto_enum1_4s(name, rop, type) \
346 void __indirect_gl ## name (GLenum e, type v1, type v2, type v3, type v4) \
348 __GLX_DECLARE_VARIABLES(); \
349 __GLX_LOAD_VARIABLES(); \
350 cmdlen = 4 + RENDER_SIZE(type, 4); \
351 __GLX_BEGIN(rop, cmdlen); \
352 if (type ## _SIZE == 8) { \
353 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v1); \
354 __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v2); \
355 __GLX_PUT_ ## type (4 + (2 * type ## _SIZE), v3); \
356 __GLX_PUT_ ## type (4 + (3 * type ## _SIZE), v4); \
357 __GLX_PUT_LONG (4 + (4 * type ## _SIZE), e); \
359 __GLX_PUT_LONG(4, e); \
360 __GLX_PUT_ ## type (8 + (0 * type ## _SIZE), v1); \
361 __GLX_PUT_ ## type (8 + (1 * type ## _SIZE), v2); \
362 __GLX_PUT_ ## type (8 + (2 * type ## _SIZE), v3); \
363 __GLX_PUT_ ## type (8 + (3 * type ## _SIZE), v4); \
368 #define glxproto_enum1_4v(name, rop, type) \
369 void __indirect_gl ## name (GLenum e, const type * v) \
371 __GLX_DECLARE_VARIABLES(); \
372 __GLX_LOAD_VARIABLES(); \
373 cmdlen = 4 + RENDER_SIZE(type, 4); \
374 __GLX_BEGIN(rop, cmdlen); \
375 if (type ## _SIZE == 8) { \
376 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v[0]); \
377 __GLX_PUT_ ## type (4 + (1 * type ## _SIZE), v[1]); \
378 __GLX_PUT_ ## type (4 + (2 * type ## _SIZE), v[2]); \
379 __GLX_PUT_ ## type (4 + (3 * type ## _SIZE), v[3]); \
380 __GLX_PUT_LONG (4 + (4 * type ## _SIZE), e); \
382 __GLX_PUT_LONG(4, e); \
383 __GLX_PUT_ ## type (8 + (0 * type ## _SIZE), v[0]); \
384 __GLX_PUT_ ## type (8 + (1 * type ## _SIZE), v[1]); \
385 __GLX_PUT_ ## type (8 + (2 * type ## _SIZE), v[2]); \
386 __GLX_PUT_ ## type (8 + (3 * type ## _SIZE), v[3]); \
391 #define glxproto_enum1_Vv(name, rop, type) \
392 void __indirect_gl ## name (GLenum pname, const type * v) \
394 __GLX_DECLARE_VARIABLES(); \
395 __GLX_LOAD_VARIABLES(); \
396 compsize = __gl ## name ## _size(pname); \
397 cmdlen = 4 + RENDER_SIZE(type, compsize); \
398 __GLX_BEGIN(rop, cmdlen); \
399 __GLX_PUT_LONG(4, pname); \
400 __GLX_PUT_ ## type ## _ARRAY(8, v, compsize); \
404 #define glxproto_enum2_1s(name, rop, type) \
405 void __indirect_gl ## name (GLenum target, GLenum pname, type v1) \
407 __GLX_DECLARE_VARIABLES(); \
408 __GLX_LOAD_VARIABLES(); \
409 cmdlen = 8 + RENDER_SIZE(type, 1); \
410 __GLX_BEGIN(rop, cmdlen); \
411 if (type ## _SIZE == 8) { \
412 __GLX_PUT_ ## type (4 + (0 * type ## _SIZE), v1); \
413 __GLX_PUT_LONG (4 + (1 * type ## _SIZE), target); \
414 __GLX_PUT_LONG (8 + (1 * type ## _SIZE), pname); \
416 __GLX_PUT_LONG(4, target); \
417 __GLX_PUT_LONG(8, pname); \
418 __GLX_PUT_ ## type (12 + (0 * type ## _SIZE), v1); \
423 #define glxproto_enum2_Vv(name, rop, type) \
424 void __indirect_gl ## name (GLenum target, GLenum pname, const type * v) \
426 __GLX_DECLARE_VARIABLES(); \
427 __GLX_LOAD_VARIABLES(); \
428 compsize = __gl ## name ## _size(pname); \
429 cmdlen = 8 + RENDER_SIZE(type, compsize); \
430 __GLX_BEGIN(rop, cmdlen); \
431 __GLX_PUT_LONG(4, target); \
432 __GLX_PUT_LONG(8, pname); \
433 __GLX_PUT_ ## type ## _ARRAY(12, v, compsize); \
437 #define GENERATE_GLX_PROTOCOL_FUNCTIONS
438 #include "indirect.h"
440 void __indirect_glRectdv(const GLdouble
*v1
, const GLdouble
*v2
)
442 __GLX_DECLARE_VARIABLES();
443 __GLX_LOAD_VARIABLES();
444 __GLX_BEGIN(X_GLrop_Rectdv
,36);
445 __GLX_PUT_DOUBLE(4,v1
[0]);
446 __GLX_PUT_DOUBLE(12,v1
[1]);
447 __GLX_PUT_DOUBLE(20,v2
[0]);
448 __GLX_PUT_DOUBLE(28,v2
[1]);
452 void __indirect_glRectfv(const GLfloat
*v1
, const GLfloat
*v2
)
454 __GLX_DECLARE_VARIABLES();
455 __GLX_LOAD_VARIABLES();
456 __GLX_BEGIN(X_GLrop_Rectfv
,20);
457 __GLX_PUT_FLOAT(4,v1
[0]);
458 __GLX_PUT_FLOAT(8,v1
[1]);
459 __GLX_PUT_FLOAT(12,v2
[0]);
460 __GLX_PUT_FLOAT(16,v2
[1]);
464 void __indirect_glRectiv(const GLint
*v1
, const GLint
*v2
)
466 __GLX_DECLARE_VARIABLES();
467 __GLX_LOAD_VARIABLES();
468 __GLX_BEGIN(X_GLrop_Rectiv
,20);
469 __GLX_PUT_LONG(4,v1
[0]);
470 __GLX_PUT_LONG(8,v1
[1]);
471 __GLX_PUT_LONG(12,v2
[0]);
472 __GLX_PUT_LONG(16,v2
[1]);
476 void __indirect_glRectsv(const GLshort
*v1
, const GLshort
*v2
)
478 __GLX_DECLARE_VARIABLES();
479 __GLX_LOAD_VARIABLES();
480 __GLX_BEGIN(X_GLrop_Rectsv
,12);
481 __GLX_PUT_SHORT(4,v1
[0]);
482 __GLX_PUT_SHORT(6,v1
[1]);
483 __GLX_PUT_SHORT(8,v2
[0]);
484 __GLX_PUT_SHORT(10,v2
[1]);
488 void __indirect_glLineStipple(GLint factor
, GLushort pattern
)
490 __GLX_DECLARE_VARIABLES();
491 __GLX_LOAD_VARIABLES();
492 __GLX_BEGIN(X_GLrop_LineStipple
,12);
493 __GLX_PUT_LONG(4,factor
);
494 __GLX_PUT_SHORT(8,pattern
);
498 void __indirect_glScissor(GLint x
, GLint y
, GLsizei width
, GLsizei height
)
500 __GLX_DECLARE_VARIABLES();
501 __GLX_LOAD_VARIABLES();
502 __GLX_BEGIN(X_GLrop_Scissor
,20);
505 __GLX_PUT_LONG(12,width
);
506 __GLX_PUT_LONG(16,height
);
510 void __indirect_glMapGrid1d(GLint un
, GLdouble u1
, GLdouble u2
)
512 __GLX_DECLARE_VARIABLES();
513 __GLX_LOAD_VARIABLES();
514 __GLX_BEGIN(X_GLrop_MapGrid1d
,24);
515 __GLX_PUT_DOUBLE(4,u1
);
516 __GLX_PUT_DOUBLE(12,u2
);
517 __GLX_PUT_LONG(20,un
);
521 void __indirect_glMapGrid1f(GLint un
, GLfloat u1
, GLfloat u2
)
523 __GLX_DECLARE_VARIABLES();
524 __GLX_LOAD_VARIABLES();
525 __GLX_BEGIN(X_GLrop_MapGrid1f
,16);
526 __GLX_PUT_LONG(4,un
);
527 __GLX_PUT_FLOAT(8,u1
);
528 __GLX_PUT_FLOAT(12,u2
);
532 void __indirect_glMapGrid2d(GLint un
, GLdouble u1
, GLdouble u2
, GLint vn
, GLdouble v1
, GLdouble v2
)
534 __GLX_DECLARE_VARIABLES();
535 __GLX_LOAD_VARIABLES();
536 __GLX_BEGIN(X_GLrop_MapGrid2d
,44);
537 __GLX_PUT_DOUBLE(4,u1
);
538 __GLX_PUT_DOUBLE(12,u2
);
539 __GLX_PUT_DOUBLE(20,v1
);
540 __GLX_PUT_DOUBLE(28,v2
);
541 __GLX_PUT_LONG(36,un
);
542 __GLX_PUT_LONG(40,vn
);
546 void __indirect_glMapGrid2f(GLint un
, GLfloat u1
, GLfloat u2
, GLint vn
, GLfloat v1
, GLfloat v2
)
548 __GLX_DECLARE_VARIABLES();
549 __GLX_LOAD_VARIABLES();
550 __GLX_BEGIN(X_GLrop_MapGrid2f
,28);
551 __GLX_PUT_LONG(4,un
);
552 __GLX_PUT_FLOAT(8,u1
);
553 __GLX_PUT_FLOAT(12,u2
);
554 __GLX_PUT_LONG(16,vn
);
555 __GLX_PUT_FLOAT(20,v1
);
556 __GLX_PUT_FLOAT(24,v2
);
560 void __indirect_glStencilFunc(GLenum func
, GLint ref
, GLuint mask
)
562 __GLX_DECLARE_VARIABLES();
563 __GLX_LOAD_VARIABLES();
564 __GLX_BEGIN(X_GLrop_StencilFunc
,16);
565 __GLX_PUT_LONG(4,func
);
566 __GLX_PUT_LONG(8,ref
);
567 __GLX_PUT_LONG(12,mask
);
571 void __indirect_glCopyPixels(GLint x
, GLint y
, GLsizei width
, GLsizei height
, GLenum type
)
573 __GLX_DECLARE_VARIABLES();
574 __GLX_LOAD_VARIABLES();
575 __GLX_BEGIN(X_GLrop_CopyPixels
,24);
578 __GLX_PUT_LONG(12,width
);
579 __GLX_PUT_LONG(16,height
);
580 __GLX_PUT_LONG(20,type
);
584 void __indirect_glViewport(GLint x
, GLint y
, GLsizei width
, GLsizei height
)
586 __GLX_DECLARE_VARIABLES();
587 __GLX_LOAD_VARIABLES();
588 __GLX_BEGIN(X_GLrop_Viewport
,20);
591 __GLX_PUT_LONG(12,width
);
592 __GLX_PUT_LONG(16,height
);
596 void __indirect_glCopyTexImage1D(GLenum target
, GLint level
, GLenum internalformat
, GLint x
, GLint y
, GLsizei width
, GLint border
)
598 __GLX_DECLARE_VARIABLES();
599 __GLX_LOAD_VARIABLES();
600 __GLX_BEGIN(X_GLrop_CopyTexImage1D
,32);
601 __GLX_PUT_LONG(4,target
);
602 __GLX_PUT_LONG(8,level
);
603 __GLX_PUT_LONG(12,internalformat
);
604 __GLX_PUT_LONG(16,x
);
605 __GLX_PUT_LONG(20,y
);
606 __GLX_PUT_LONG(24,width
);
607 __GLX_PUT_LONG(28,border
);
611 void __indirect_glCopyTexImage2D(GLenum target
, GLint level
, GLenum internalformat
, GLint x
, GLint y
, GLsizei width
, GLsizei height
, GLint border
)
613 __GLX_DECLARE_VARIABLES();
614 __GLX_LOAD_VARIABLES();
615 __GLX_BEGIN(X_GLrop_CopyTexImage2D
,36);
616 __GLX_PUT_LONG(4,target
);
617 __GLX_PUT_LONG(8,level
);
618 __GLX_PUT_LONG(12,internalformat
);
619 __GLX_PUT_LONG(16,x
);
620 __GLX_PUT_LONG(20,y
);
621 __GLX_PUT_LONG(24,width
);
622 __GLX_PUT_LONG(28,height
);
623 __GLX_PUT_LONG(32,border
);
627 void __indirect_glCopyTexSubImage1D(GLenum target
, GLint level
, GLint xoffset
, GLint x
, GLint y
, GLsizei width
)
629 __GLX_DECLARE_VARIABLES();
630 __GLX_LOAD_VARIABLES();
631 __GLX_BEGIN(X_GLrop_CopyTexSubImage1D
,28);
632 __GLX_PUT_LONG(4,target
);
633 __GLX_PUT_LONG(8,level
);
634 __GLX_PUT_LONG(12,xoffset
);
635 __GLX_PUT_LONG(16,x
);
636 __GLX_PUT_LONG(20,y
);
637 __GLX_PUT_LONG(24,width
);
641 void __indirect_glCopyTexSubImage2D(GLenum target
, GLint level
, GLint xoffset
, GLint yoffset
, GLint x
, GLint y
, GLsizei width
, GLsizei height
)
643 __GLX_DECLARE_VARIABLES();
644 __GLX_LOAD_VARIABLES();
645 __GLX_BEGIN(X_GLrop_CopyTexSubImage2D
,36);
646 __GLX_PUT_LONG(4,target
);
647 __GLX_PUT_LONG(8,level
);
648 __GLX_PUT_LONG(12,xoffset
);
649 __GLX_PUT_LONG(16,yoffset
);
650 __GLX_PUT_LONG(20,x
);
651 __GLX_PUT_LONG(24,y
);
652 __GLX_PUT_LONG(28,width
);
653 __GLX_PUT_LONG(32,height
);
657 void __indirect_glPrioritizeTextures(GLsizei n
, const GLuint
*textures
, const GLclampf
*priorities
)
659 __GLX_DECLARE_VARIABLES();
660 __GLX_LOAD_VARIABLES();
663 __GLX_BEGIN(X_GLrop_PrioritizeTextures
,cmdlen
);
665 __GLX_PUT_LONG_ARRAY(8,textures
,n
);
666 __GLX_PUT_FLOAT_ARRAY(8+n
*4,priorities
,n
);
670 void __indirect_glCopyColorTable(GLenum target
, GLenum internalformat
, GLint x
, GLint y
, GLsizei width
)
672 __GLX_DECLARE_VARIABLES();
673 __GLX_LOAD_VARIABLES();
674 __GLX_BEGIN(X_GLrop_CopyColorTable
,24);
675 __GLX_PUT_LONG(4,target
);
676 __GLX_PUT_LONG(8,internalformat
);
677 __GLX_PUT_LONG(12,x
);
678 __GLX_PUT_LONG(16,y
);
679 __GLX_PUT_LONG(20,width
);
683 void __indirect_glCopyColorSubTable(GLenum target
, GLsizei start
, GLint x
, GLint y
, GLsizei width
)
685 __GLX_DECLARE_VARIABLES();
686 __GLX_LOAD_VARIABLES();
687 __GLX_BEGIN(X_GLrop_CopyColorSubTable
,24);
688 __GLX_PUT_LONG(4,target
);
689 __GLX_PUT_LONG(8,start
);
690 __GLX_PUT_LONG(12,x
);
691 __GLX_PUT_LONG(16,y
);
692 __GLX_PUT_LONG(20,width
);
696 void __indirect_glCopyConvolutionFilter1D(GLenum target
, GLenum internalformat
, GLint x
, GLint y
, GLsizei width
)
698 __GLX_DECLARE_VARIABLES();
699 __GLX_LOAD_VARIABLES();
700 __GLX_BEGIN(X_GLrop_CopyConvolutionFilter1D
,24);
701 __GLX_PUT_LONG(4,target
);
702 __GLX_PUT_LONG(8,internalformat
);
703 __GLX_PUT_LONG(12,x
);
704 __GLX_PUT_LONG(16,y
);
705 __GLX_PUT_LONG(20,width
);
709 void __indirect_glCopyConvolutionFilter2D(GLenum target
, GLenum internalformat
, GLint x
, GLint y
, GLsizei width
, GLsizei height
)
711 __GLX_DECLARE_VARIABLES();
712 __GLX_LOAD_VARIABLES();
713 __GLX_BEGIN(X_GLrop_CopyConvolutionFilter2D
,28);
714 __GLX_PUT_LONG(4,target
);
715 __GLX_PUT_LONG(8,internalformat
);
716 __GLX_PUT_LONG(12,x
);
717 __GLX_PUT_LONG(16,y
);
718 __GLX_PUT_LONG(20,width
);
719 __GLX_PUT_LONG(24,height
);
723 void __indirect_glHistogram(GLenum target
, GLsizei width
, GLenum internalformat
, GLboolean sink
)
725 __GLX_DECLARE_VARIABLES();
726 __GLX_LOAD_VARIABLES();
727 __GLX_BEGIN(X_GLrop_Histogram
,20);
728 __GLX_PUT_LONG(4,target
);
729 __GLX_PUT_LONG(8,width
);
730 __GLX_PUT_LONG(12,internalformat
);
731 __GLX_PUT_CHAR(16,sink
);
735 void __indirect_glCopyTexSubImage3D(GLenum target
, GLint level
, GLint xoffset
, GLint yoffset
, GLint zoffset
, GLint x
, GLint y
, GLsizei width
, GLsizei height
)
737 __GLX_DECLARE_VARIABLES();
738 __GLX_LOAD_VARIABLES();
739 __GLX_BEGIN(X_GLrop_CopyTexSubImage3D
,40);
740 __GLX_PUT_LONG(4,target
);
741 __GLX_PUT_LONG(8,level
);
742 __GLX_PUT_LONG(12,xoffset
);
743 __GLX_PUT_LONG(16,yoffset
);
744 __GLX_PUT_LONG(20,zoffset
);
745 __GLX_PUT_LONG(24,x
);
746 __GLX_PUT_LONG(28,y
);
747 __GLX_PUT_LONG(32,width
);
748 __GLX_PUT_LONG(36,height
);