Slurp up from Tizen:Main
[profile/ivi/xorg-glproto.git] / glxproto.h
1 #ifndef _GLX_glxproto_h_
2 #define _GLX_glxproto_h_
3
4 /*
5  * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
6  * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining a
9  * copy of this software and associated documentation files (the "Software"),
10  * to deal in the Software without restriction, including without limitation
11  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12  * and/or sell copies of the Software, and to permit persons to whom the
13  * Software is furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice including the dates of first publication and
16  * either this permission notice or a reference to
17  * http://oss.sgi.com/projects/FreeB/
18  * shall be included in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23  * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
25  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26  * SOFTWARE.
27  *
28  * Except as contained in this notice, the name of Silicon Graphics, Inc.
29  * shall not be used in advertising or otherwise to promote the sale, use or
30  * other dealings in this Software without prior written authorization from
31  * Silicon Graphics, Inc.
32  */
33
34 #include <GL/glxmd.h>
35
36 /*****************************************************************************/
37
38 /*
39 ** Errrors.
40 */
41 #define GLXBadContext           0
42 #define GLXBadContextState      1
43 #define GLXBadDrawable          2
44 #define GLXBadPixmap            3
45 #define GLXBadContextTag        4
46 #define GLXBadCurrentWindow     5
47 #define GLXBadRenderRequest     6
48 #define GLXBadLargeRequest      7
49 #define GLXUnsupportedPrivateRequest    8
50 #define GLXBadFBConfig          9
51 #define GLXBadPbuffer           10
52 #define GLXBadCurrentDrawable   11
53 #define GLXBadWindow            12
54 #define GLXBadProfileARB        13
55
56 #define __GLX_NUMBER_ERRORS 14
57
58 /*
59 ** Events.
60 ** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX
61 **  event - this helps initialization if the server supports the pbuffer
62 **  extension and the client doesn't.
63 */
64 #define GLX_PbufferClobber      0
65 #define GLX_BufferSwapComplete  1
66
67 #define __GLX_NUMBER_EVENTS 17
68
69 #define GLX_EXTENSION_NAME      "GLX"
70 #define GLX_EXTENSION_ALIAS     "SGI-GLX"
71
72 #define __GLX_MAX_CONTEXT_PROPS 3
73
74 #ifndef GLX_VENDOR
75 #define GLX_VENDOR              0x1
76 #endif
77 #ifndef GLX_VERSION
78 #define GLX_VERSION             0x2
79 #endif
80 #ifndef GLX_EXTENSIONS
81 #define GLX_EXTENSIONS          0x3
82 #endif
83
84 /*****************************************************************************/
85
86 /*
87 ** For the structure definitions in this file, we must redefine these types in
88 ** terms of Xmd.h types, which may include bitfields.  All of these are
89 ** undef'ed at the end of this file, restoring the definitions in glx.h.
90 */
91 #define GLXContextID CARD32
92 #define GLXPixmap CARD32
93 #define GLXDrawable CARD32
94 #define GLXPbuffer CARD32
95 #define GLXWindow CARD32
96 #define GLXFBConfigID CARD32
97 #define GLXFBConfigIDSGIX CARD32
98 #define GLXPbufferSGIX CARD32
99
100 /*
101 ** ContextTag is not exposed to the API.
102 */
103 typedef CARD32 GLXContextTag;
104
105 /*****************************************************************************/
106
107 /*
108 ** Sizes of basic wire types.
109 */
110 #define __GLX_SIZE_INT8         1
111 #define __GLX_SIZE_INT16        2
112 #define __GLX_SIZE_INT32        4
113 #define __GLX_SIZE_CARD8        1
114 #define __GLX_SIZE_CARD16       2
115 #define __GLX_SIZE_CARD32       4
116 #define __GLX_SIZE_FLOAT32      4
117 #define __GLX_SIZE_FLOAT64      8
118
119 /*****************************************************************************/
120
121 /* Requests */
122
123 /*
124 ** Render command request.  A bunch of rendering commands are packed into
125 ** a single X extension request.
126 */
127 typedef struct GLXRender {
128     CARD8       reqType;
129     CARD8       glxCode;
130     CARD16      length B16;
131     GLXContextTag contextTag B32;
132 } xGLXRenderReq;
133 #define sz_xGLXRenderReq 8
134
135 /*
136 ** The maximum size that a GLXRender command can be.  The value must fit
137 ** in 16 bits and should be a multiple of 4.
138 */
139 #define __GLX_MAX_RENDER_CMD_SIZE       64000
140
141 /*
142 ** Large render command request.  A single large rendering command
143 ** is output in multiple X extension requests.  The first packet
144 ** contains an opcode dependent header (see below) that describes
145 ** the data that follows.
146 */
147 typedef struct GLXRenderLarge {
148     CARD8       reqType;
149     CARD8       glxCode;
150     CARD16      length B16;
151     GLXContextTag contextTag B32;
152     CARD16      requestNumber B16;
153     CARD16      requestTotal B16;
154     CARD32      dataBytes B32;
155 } xGLXRenderLargeReq;
156 #define sz_xGLXRenderLargeReq 16
157
158 /*
159 ** GLX single request.  Commands that go over as single GLX protocol
160 ** requests use this structure.  The glxCode will be one of the X_GLsop
161 ** opcodes.
162 */
163 typedef struct GLXSingle {
164     CARD8       reqType;
165     CARD8       glxCode;
166     CARD16      length B16;
167     GLXContextTag contextTag B32;
168 } xGLXSingleReq;
169 #define sz_xGLXSingleReq 8
170
171 /*
172 ** glXQueryVersion request
173 */
174 typedef struct GLXQueryVersion {
175     CARD8       reqType;
176     CARD8       glxCode;
177     CARD16      length B16;
178     CARD32      majorVersion B32;
179     CARD32      minorVersion B32;
180 } xGLXQueryVersionReq;
181 #define sz_xGLXQueryVersionReq 12
182
183 /*
184 ** glXIsDirect request
185 */
186 typedef struct GLXIsDirect {
187     CARD8       reqType;
188     CARD8       glxCode;
189     CARD16      length B16;
190     GLXContextID context B32;
191 } xGLXIsDirectReq;
192 #define sz_xGLXIsDirectReq 8
193
194 /*
195 ** glXCreateContext request
196 */
197 typedef struct GLXCreateContext {
198     CARD8       reqType;
199     CARD8       glxCode;
200     CARD16      length B16;
201     GLXContextID context B32;
202     CARD32      visual B32;
203     CARD32      screen B32;
204     GLXContextID shareList B32;
205     BOOL        isDirect;
206     CARD8       reserved1;
207     CARD16      reserved2 B16;
208 } xGLXCreateContextReq;
209 #define sz_xGLXCreateContextReq 24
210
211 /*
212 ** glXDestroyContext request
213 */
214 typedef struct GLXDestroyContext {
215     CARD8       reqType;
216     CARD8       glxCode;
217     CARD16      length B16;
218     GLXContextID context B32;
219 } xGLXDestroyContextReq;
220 #define sz_xGLXDestroyContextReq 8
221
222 /*
223 ** glXMakeCurrent request
224 */
225 typedef struct GLXMakeCurrent {
226     CARD8       reqType;
227     CARD8       glxCode;
228     CARD16      length B16;
229     GLXDrawable drawable B32;
230     GLXContextID context B32;
231     GLXContextTag oldContextTag B32;
232 } xGLXMakeCurrentReq;
233 #define sz_xGLXMakeCurrentReq 16
234
235 /*
236 ** glXWaitGL request
237 */
238 typedef struct GLXWaitGL {
239     CARD8       reqType;
240     CARD8       glxCode;
241     CARD16      length B16;
242     GLXContextTag contextTag B32;
243 } xGLXWaitGLReq;
244 #define sz_xGLXWaitGLReq 8
245
246 /*
247 ** glXWaitX request
248 */
249 typedef struct GLXWaitX {
250     CARD8       reqType;
251     CARD8       glxCode;
252     CARD16      length B16;
253     GLXContextTag contextTag B32;
254 } xGLXWaitXReq;
255 #define sz_xGLXWaitXReq 8
256
257 /*
258 ** glXCopyContext request
259 */
260 typedef struct GLXCopyContext {
261     CARD8       reqType;
262     CARD8       glxCode;
263     CARD16      length B16;
264     GLXContextID source B32;
265     GLXContextID dest B32;
266     CARD32      mask B32;
267     GLXContextTag contextTag B32;
268 } xGLXCopyContextReq;
269 #define sz_xGLXCopyContextReq 20
270
271 /*
272 ** glXSwapBuffers request
273 */
274 typedef struct GLXSwapBuffers {
275     CARD8       reqType;
276     CARD8       glxCode;
277     CARD16      length B16;
278     GLXContextTag contextTag B32;
279     GLXDrawable drawable B32;
280 } xGLXSwapBuffersReq;
281 #define sz_xGLXSwapBuffersReq 12
282
283 /*
284 ** glXUseXFont request
285 */
286 typedef struct GLXUseXFont {
287     CARD8       reqType;
288     CARD8       glxCode;
289     CARD16      length B16;
290     GLXContextTag contextTag B32;
291     CARD32      font B32;
292     CARD32      first B32;
293     CARD32      count B32;
294     CARD32      listBase B32;
295 } xGLXUseXFontReq;
296 #define sz_xGLXUseXFontReq 24
297
298 /*
299 ** glXCreateGLXPixmap request
300 */
301 typedef struct GLXCreateGLXPixmap {
302     CARD8       reqType;
303     CARD8       glxCode;
304     CARD16      length B16;
305     CARD32      screen B32;
306     CARD32      visual B32;
307     CARD32      pixmap B32;
308     GLXPixmap   glxpixmap B32;
309 } xGLXCreateGLXPixmapReq;
310 #define sz_xGLXCreateGLXPixmapReq 20
311
312 /*
313 ** glXDestroyGLXPixmap request
314 */
315 typedef struct GLXDestroyGLXPixmap {
316     CARD8       reqType;
317     CARD8       glxCode;
318     CARD16      length B16;
319     GLXPixmap   glxpixmap B32;
320 } xGLXDestroyGLXPixmapReq;
321 #define sz_xGLXDestroyGLXPixmapReq 8
322
323 /*
324 ** glXGetVisualConfigs request
325 */
326 typedef struct GLXGetVisualConfigs {
327     CARD8       reqType;
328     CARD8       glxCode;
329     CARD16      length B16;
330     CARD32      screen B32;
331 } xGLXGetVisualConfigsReq;
332 #define sz_xGLXGetVisualConfigsReq 8
333
334 /*
335 ** glXVendorPrivate request.
336 */
337 typedef struct GLXVendorPrivate {
338     CARD8       reqType;
339     CARD8       glxCode;
340     CARD16      length B16;
341     CARD32      vendorCode B32;         /* vendor-specific opcode */
342     GLXContextTag contextTag B32;
343     /*
344     ** More data may follow; this is just the header.
345     */
346 } xGLXVendorPrivateReq;
347 #define sz_xGLXVendorPrivateReq 12
348
349 /*
350 ** glXVendorPrivateWithReply request
351 */
352 typedef struct GLXVendorPrivateWithReply {
353     CARD8       reqType;
354     CARD8       glxCode;
355     CARD16      length B16;
356     CARD32      vendorCode B32;         /* vendor-specific opcode */
357     GLXContextTag contextTag B32;
358     /*
359     ** More data may follow; this is just the header.
360     */
361 } xGLXVendorPrivateWithReplyReq;
362 #define sz_xGLXVendorPrivateWithReplyReq 12
363
364 /*
365 ** glXQueryExtensionsString request
366 */
367 typedef struct GLXQueryExtensionsString {
368     CARD8       reqType;
369     CARD8       glxCode;
370     CARD16      length B16;
371     CARD32      screen B32;
372 } xGLXQueryExtensionsStringReq;
373 #define sz_xGLXQueryExtensionsStringReq 8
374
375 /*
376 ** glXQueryServerString request
377 */
378 typedef struct GLXQueryServerString {
379     CARD8       reqType;
380     CARD8       glxCode;
381     CARD16      length B16;
382     CARD32      screen  B32;
383     CARD32      name B32;
384 } xGLXQueryServerStringReq;
385 #define sz_xGLXQueryServerStringReq 12
386
387 /*
388 ** glXClientInfo request
389 */
390 typedef struct GLXClientInfo {
391     CARD8       reqType;
392     CARD8       glxCode;
393     CARD16      length B16;
394     CARD32      major B32;
395     CARD32      minor B32;
396     CARD32      numbytes B32;
397 } xGLXClientInfoReq;
398 #define sz_xGLXClientInfoReq 16
399
400 /*** Start of GLX 1.3 requests */
401
402 /*
403 ** glXGetFBConfigs request
404 */
405 typedef struct GLXGetFBConfigs {
406     CARD8       reqType;
407     CARD8       glxCode;
408     CARD16      length B16;
409     CARD32      screen B32;
410 } xGLXGetFBConfigsReq;
411 #define sz_xGLXGetFBConfigsReq 8
412
413 /*
414 ** glXCreatePixmap request
415 */
416 typedef struct GLXCreatePixmap {
417     CARD8       reqType;
418     CARD8       glxCode;
419     CARD16      length B16;
420     CARD32      screen B32;
421     GLXFBConfigID fbconfig B32;
422     CARD32      pixmap B32;
423     GLXPixmap   glxpixmap B32;
424     CARD32      numAttribs B32;
425     /* followed by attribute list */
426 } xGLXCreatePixmapReq;
427 #define sz_xGLXCreatePixmapReq 24
428
429 /*
430 ** glXDestroyPixmap request
431 */
432 typedef struct GLXDestroyPixmap {
433     CARD8       reqType;
434     CARD8       glxCode;
435     CARD16      length B16;
436     GLXPixmap   glxpixmap B32;
437 } xGLXDestroyPixmapReq;
438 #define sz_xGLXDestroyPixmapReq 8
439
440 /*
441 ** glXCreateNewContext request
442 */
443 typedef struct GLXCreateNewContext {
444     CARD8       reqType;
445     CARD8       glxCode;
446     CARD16      length B16;
447     GLXContextID context B32;
448     GLXFBConfigID fbconfig B32;
449     CARD32      screen B32;
450     CARD32      renderType;
451     GLXContextID shareList B32;
452     BOOL        isDirect;
453     CARD8       reserved1;
454     CARD16      reserved2 B16;
455 } xGLXCreateNewContextReq;
456 #define sz_xGLXCreateNewContextReq 28
457
458 /*
459 ** glXQueryContext request
460 */
461 typedef struct GLXQueryContext {
462     CARD8       reqType;
463     CARD8       glxCode;
464     CARD16      length B16;
465     GLXContextID context B32;
466 } xGLXQueryContextReq;
467 #define sz_xGLXQueryContextReq 8
468
469 /*
470 ** glXMakeContextCurrent request
471 */
472 typedef struct GLXMakeContextCurrent {
473     CARD8       reqType;
474     CARD8       glxCode;
475     CARD16      length B16;
476     GLXContextTag oldContextTag B32;
477     GLXDrawable drawable B32;
478     GLXDrawable readdrawable B32;
479     GLXContextID context B32;
480 } xGLXMakeContextCurrentReq;
481 #define sz_xGLXMakeContextCurrentReq 20
482
483 /*
484 ** glXCreatePbuffer request
485 */
486 typedef struct GLXCreatePbuffer {
487     CARD8       reqType;
488     CARD8       glxCode;
489     CARD16      length B16;
490     CARD32      screen B32;
491     GLXFBConfigID fbconfig B32;
492     GLXPbuffer  pbuffer B32;
493     CARD32      numAttribs B32;
494     /* followed by attribute list */
495 } xGLXCreatePbufferReq;
496 #define sz_xGLXCreatePbufferReq 20
497
498 /*
499 ** glXDestroyPbuffer request
500 */
501 typedef struct GLXDestroyPbuffer {
502     CARD8       reqType;
503     CARD8       glxCode;
504     CARD16      length B16;
505     GLXPbuffer  pbuffer B32;
506 } xGLXDestroyPbufferReq;
507 #define sz_xGLXDestroyPbufferReq 8
508
509 /*
510 ** glXGetDrawableAttributes request
511 */
512 typedef struct GLXGetDrawableAttributes {
513     CARD8       reqType;
514     CARD8       glxCode;
515     CARD16      length B16;
516     GLXDrawable drawable B32;
517 } xGLXGetDrawableAttributesReq;
518 #define sz_xGLXGetDrawableAttributesReq 8
519
520 /*
521 ** glXChangeDrawableAttributes request
522 */
523 typedef struct GLXChangeDrawableAttributes {
524     CARD8       reqType;
525     CARD8       glxCode;
526     CARD16      length B16;
527     GLXDrawable drawable B32;
528     CARD32      numAttribs B32;
529     /* followed by attribute list */
530 } xGLXChangeDrawableAttributesReq;
531 #define sz_xGLXChangeDrawableAttributesReq 12
532
533 /*
534 ** glXCreateWindow request
535 */
536 typedef struct GLXCreateWindow {
537     CARD8       reqType;
538     CARD8       glxCode;
539     CARD16      length B16;
540     CARD32      screen B32;
541     GLXFBConfigID fbconfig B32;
542     CARD32      window B32;
543     GLXWindow   glxwindow B32;
544     CARD32      numAttribs B32;
545     /* followed by attribute list */
546 } xGLXCreateWindowReq;
547 #define sz_xGLXCreateWindowReq 24
548
549 /*
550 ** glXDestroyWindow request
551 */
552 typedef struct GLXDestroyWindow {
553     CARD8       reqType;
554     CARD8       glxCode;
555     CARD16      length B16;
556     GLXWindow   glxwindow B32;
557 } xGLXDestroyWindowReq;
558 #define sz_xGLXDestroyWindowReq 8
559
560 /* Replies */
561
562 typedef struct {
563     BYTE        type;                   /* X_Reply */
564     CARD8       unused;                 /* not used */
565     CARD16      sequenceNumber B16;
566     CARD32      length B32;
567     CARD32      error B32;
568     CARD32      pad2 B32;
569     CARD32      pad3 B32;
570     CARD32      pad4 B32;
571     CARD32      pad5 B32;
572     CARD32      pad6 B32;
573 } xGLXGetErrorReply;
574 #define sz_xGLXGetErrorReply 32
575
576 typedef struct {
577     BYTE        type;                   /* X_Reply */
578     CARD8       unused;                 /* not used */
579     CARD16      sequenceNumber B16;
580     CARD32      length B32;
581     GLXContextTag contextTag B32;
582     CARD32      pad2 B32;
583     CARD32      pad3 B32;
584     CARD32      pad4 B32;
585     CARD32      pad5 B32;
586     CARD32      pad6 B32;
587 } xGLXMakeCurrentReply;
588 #define sz_xGLXMakeCurrentReply 32
589
590 typedef struct {
591     BYTE        type;                   /* X_Reply */
592     CARD8       unused;                 /* not used */
593     CARD16      sequenceNumber B16;
594     CARD32      length B32;
595     CARD32      pad1 B32;
596     CARD32      pad2 B32;
597     CARD32      pad3 B32;
598     CARD32      pad4 B32;
599     CARD32      pad5 B32;
600     CARD32      pad6 B32;
601 } xGLXReadPixelsReply;
602 #define sz_xGLXReadPixelsReply 32
603
604 typedef struct {
605     BYTE        type;                   /* X_Reply */
606     CARD8       unused;                 /* not used */
607     CARD16      sequenceNumber B16;
608     CARD32      length B32;
609     CARD32      pad1 B32;
610     CARD32      pad2 B32;
611     CARD32      width B32;
612     CARD32      height B32;
613     CARD32      depth B32;
614     CARD32      pad6 B32;
615 } xGLXGetTexImageReply;
616 #define sz_xGLXGetTexImageReply 32
617
618 typedef struct {
619     BYTE        type;                   /* X_Reply */
620     CARD8       unused;                 /* not used */
621     CARD16      sequenceNumber B16;
622     CARD32      length B32;
623     CARD32      pad1 B32;
624     CARD32      pad2 B32;
625     CARD32      width B32;
626     CARD32      height B32;
627     CARD32      pad5 B32;
628     CARD32      pad6 B32;
629 } xGLXGetSeparableFilterReply;
630 #define sz_xGLXGetSeparableFilterReply 32
631
632 typedef struct {
633     BYTE        type;                   /* X_Reply */
634     CARD8       unused;                 /* not used */
635     CARD16      sequenceNumber B16;
636     CARD32      length B32;
637     CARD32      pad1 B32;
638     CARD32      pad2 B32;
639     CARD32      width B32;
640     CARD32      height B32;
641     CARD32      pad5 B32;
642     CARD32      pad6 B32;
643 } xGLXGetConvolutionFilterReply;
644 #define sz_xGLXGetConvolutionFilterReply 32
645
646 typedef struct {
647     BYTE        type;                   /* X_Reply */
648     CARD8       unused;                 /* not used */
649     CARD16      sequenceNumber B16;
650     CARD32      length B32;
651     CARD32      pad1 B32;
652     CARD32      pad2 B32;
653     CARD32      width B32;
654     CARD32      pad4 B32;
655     CARD32      pad5 B32;
656     CARD32      pad6 B32;
657 } xGLXGetHistogramReply;
658 #define sz_xGLXGetHistogramReply 32
659
660 typedef struct {
661     BYTE        type;                   /* X_Reply */
662     CARD8       unused;                 /* not used */
663     CARD16      sequenceNumber B16;
664     CARD32      length B32;
665     CARD32      pad1 B32;
666     CARD32      pad2 B32;
667     CARD32      pad3 B32;
668     CARD32      pad4 B32;
669     CARD32      pad5 B32;
670     CARD32      pad6 B32;
671 } xGLXGetMinmaxReply;
672 #define sz_xGLXGetMinmaxReply 32
673
674 typedef struct {
675     BYTE        type;                   /* X_Reply */
676     CARD8       unused;                 /* not used */
677     CARD16      sequenceNumber B16;
678     CARD32      length B32;
679     CARD32      retval B32;
680     CARD32      size B32;
681     CARD32      newMode B32;
682     CARD32      pad4 B32;
683     CARD32      pad5 B32;
684     CARD32      pad6 B32;
685 } xGLXRenderModeReply;
686 #define sz_xGLXRenderModeReply 32
687
688 typedef struct {
689     BYTE        type;                   /* X_Reply */
690     CARD8       unused;                 /* not used */
691     CARD16      sequenceNumber B16;
692     CARD32      length B32;
693     CARD32      majorVersion B32;
694     CARD32      minorVersion B32;
695     CARD32      pad3 B32;
696     CARD32      pad4 B32;
697     CARD32      pad5 B32;
698     CARD32      pad6 B32;
699 } xGLXQueryVersionReply;
700 #define sz_xGLXQueryVersionReply 32
701
702 typedef struct {
703     BYTE        type;                   /* X_Reply */
704     CARD8       unused;                 /* not used */
705     CARD16      sequenceNumber B16;
706     CARD32      length B32;
707     CARD32      numVisuals B32;
708     CARD32      numProps B32;
709     CARD32      pad3 B32;
710     CARD32      pad4 B32;
711     CARD32      pad5 B32;
712     CARD32      pad6 B32;
713 } xGLXGetVisualConfigsReply;
714 #define sz_xGLXGetVisualConfigsReply 32
715
716 typedef struct {
717     BYTE        type;                   /* X_Reply */
718     CARD8       unused;                 /* not used */
719     CARD16      sequenceNumber B16;
720     CARD32      length B32;
721     BOOL        isDirect;
722     CARD8       pad1;
723     CARD16      pad2 B16;
724     CARD32      pad3 B32;
725     CARD32      pad4 B32;
726     CARD32      pad5 B32;
727     CARD32      pad6 B32;
728     CARD32      pad7 B32;
729 } xGLXIsDirectReply;
730 #define sz_xGLXIsDirectReply    32
731
732 /*
733 ** This reply structure is used for all single replies.  Single replies
734 ** ship either 1 piece of data or N pieces of data.  In these cases
735 ** size indicates how much data is to be returned.
736 */
737 typedef struct {
738     BYTE        type;                   /* X_Reply */
739     CARD8       unused;                 /* not used */
740     CARD16      sequenceNumber B16;
741     CARD32      length B32;
742     CARD32      retval B32;
743     CARD32      size B32;
744     CARD32      pad3 B32;               /* NOTE: may hold a single value */
745     CARD32      pad4 B32;               /* NOTE: may hold half a double */
746     CARD32      pad5 B32;
747     CARD32      pad6 B32;
748 } xGLXSingleReply;
749 #define sz_xGLXSingleReply 32
750
751 /*
752 ** This reply structure is used for all Vendor Private replies. Vendor
753 ** Private replies can ship up to 24 bytes within the header or can
754 ** be variable sized, in which case, the reply length field indicates
755 ** the number of words of data which follow the header.
756 */
757 typedef struct {
758     BYTE        type;                   /* X_Reply */
759     CARD8       unused;                 /* not used */
760     CARD16      sequenceNumber B16;
761     CARD32      length B32;
762     CARD32      retval B32;
763     CARD32      size B32;
764     CARD32      pad3 B32;
765     CARD32      pad4 B32;
766     CARD32      pad5 B32;
767     CARD32      pad6 B32;
768 } xGLXVendorPrivReply;
769 #define sz_xGLXVendorPrivReply 32
770
771 /*
772 **  QueryExtensionsStringReply
773 **  n indicates the number of bytes to be returned.
774 */
775 typedef struct {
776     BYTE        type;                   /* X_Reply */
777     CARD8       unused;                 /* not used */
778     CARD16      sequenceNumber B16;
779     CARD32      length B32;
780     CARD32      pad1 B32;
781     CARD32      n B32;
782     CARD32      pad3 B32;
783     CARD32      pad4 B32;
784     CARD32      pad5 B32;
785     CARD32      pad6 B32;
786 } xGLXQueryExtensionsStringReply;
787 #define sz_xGLXQueryExtensionsStringReply 32
788
789 /*
790 ** QueryServerString Reply struct
791 ** n indicates the number of bytes to be returned.
792 */
793 typedef struct {
794     BYTE        type;                   /* X_Reply */
795     CARD8       unused;                 /* not used */
796     CARD16      sequenceNumber B16;
797     CARD32      length B32;
798     CARD32      pad1 B32;
799     CARD32      n B32;
800     CARD32      pad3 B32;               /* NOTE: may hold a single value */
801     CARD32      pad4 B32;               /* NOTE: may hold half a double */
802     CARD32      pad5 B32;
803     CARD32      pad6 B32;
804 } xGLXQueryServerStringReply;
805 #define sz_xGLXQueryServerStringReply 32
806
807 /*** Start of GLX 1.3 replies */
808
809 /*
810 ** glXGetFBConfigs reply
811 */
812 typedef struct {
813     BYTE        type;                   /* X_Reply */
814     CARD8       unused;                 /* not used */
815     CARD16      sequenceNumber B16;
816     CARD32      length B32;
817     CARD32      numFBConfigs B32;
818     CARD32      numAttribs B32;
819     CARD32      pad3 B32;
820     CARD32      pad4 B32;
821     CARD32      pad5 B32;
822     CARD32      pad6 B32;
823 } xGLXGetFBConfigsReply;
824 #define sz_xGLXGetFBConfigsReply 32
825
826 /*
827 ** glXQueryContext reply
828 */
829 typedef struct {
830     BYTE        type;                   /* X_Reply */
831     CARD8       unused;                 /* not used */
832     CARD16      sequenceNumber B16;
833     CARD32      length B32;
834     CARD32      n B32;                  /* number of attribute/value pairs */
835     CARD32      pad2 B32;
836     CARD32      pad3 B32;
837     CARD32      pad4 B32;
838     CARD32      pad5 B32;
839     CARD32      pad6 B32;
840 } xGLXQueryContextReply;
841 #define sz_xGLXQueryContextReply 32
842
843 /*
844 ** glXMakeContextCurrent reply
845 */
846 typedef struct {
847     BYTE        type;                   /* X_Reply */
848     CARD8       unused;                 /* not used */
849     CARD16      sequenceNumber B16;
850     CARD32      length B32;
851     GLXContextTag contextTag B32;
852     CARD32      pad2 B32;
853     CARD32      pad3 B32;
854     CARD32      pad4 B32;
855     CARD32      pad5 B32;
856     CARD32      pad6 B32;
857 } xGLXMakeContextCurrentReply;
858 #define sz_xGLXMakeContextCurrentReply 32
859
860 /*
861 ** glXCreateGLXPbuffer reply
862 ** This is used only in the direct rendering case on SGIs - otherwise
863 **  CreateGLXPbuffer has no reply. It is not part of GLX 1.3.
864 */
865 typedef struct {
866     BYTE        type;                   /* X_Reply */
867     CARD8       success;
868     CARD16      sequenceNumber B16;
869     CARD32      length B32;
870     CARD32      pad1 B32;
871     CARD32      pad2 B32;
872     CARD32      pad3 B32;
873     CARD32      pad4 B32;
874     CARD32      pad5 B32;
875     CARD32      pad6 B32;
876 } xGLXCreateGLXPbufferReply;
877 #define sz_xGLXCreateGLXPbufferReply 32
878
879 /*
880 ** glXGetDrawableAttributes reply
881 */
882 typedef struct {
883     BYTE        type;                   /* X_Reply */
884     CARD8       unused;                 /* not used */
885     CARD16      sequenceNumber B16;
886     CARD32      length B32;
887     CARD32      numAttribs B32;
888     CARD32      pad2 B32;
889     CARD32      pad3 B32;
890     CARD32      pad4 B32;
891     CARD32      pad5 B32;
892     CARD32      pad6 B32;
893 } xGLXGetDrawableAttributesReply;
894 #define sz_xGLXGetDrawableAttributesReply 32
895
896 /*
897 ** glXGetColorTable reply
898 */
899 typedef struct {
900     BYTE        type;                  /* X_Reply */
901     CARD8       unused;                /* not used */
902     CARD16      sequenceNumber B16;
903     CARD32      length B32;
904     CARD32      pad1 B32;
905     CARD32      pad2 B32;
906     CARD32      width B32;
907     CARD32      pad4 B32;
908     CARD32      pad5 B32;
909     CARD32      pad6 B32;
910 } xGLXGetColorTableReply;
911 #define sz_xGLXGetColorTableReply 32
912
913 /************************************************************************/
914
915 /* GLX extension requests and replies */
916
917 /*
918 ** glXQueryContextInfoEXT request
919 */
920 typedef struct GLXQueryContextInfoEXT {
921     CARD8       reqType;
922     CARD8       glxCode;
923     CARD16      length B16;
924     CARD32      vendorCode B32;         /* vendor-specific opcode */
925     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
926     GLXContextID context B32;
927 } xGLXQueryContextInfoEXTReq;
928 #define sz_xGLXQueryContextInfoEXTReq 16
929
930 /*
931 ** glXQueryContextInfoEXT reply
932 */
933 typedef struct {
934     BYTE        type;                   /* X_Reply */
935     CARD8       unused;                 /* not used */
936     CARD16      sequenceNumber B16;
937     CARD32      length B32;
938     CARD32      n B32;                  /* number of attribute/value pairs */
939     CARD32      pad2 B32;
940     CARD32      pad3 B32;
941     CARD32      pad4 B32;
942     CARD32      pad5 B32;
943     CARD32      pad6 B32;
944 } xGLXQueryContextInfoEXTReply;
945 #define sz_xGLXQueryContextInfoEXTReply 32
946
947 /*
948 ** glXMakeCurrentReadSGI request
949 */
950 typedef struct GLXMakeCurrentReadSGI {
951     CARD8       reqType;
952     CARD8       glxCode;
953     CARD16      length B16;
954     CARD32      vendorCode B32;         /* vendor-specific opcode */
955     GLXContextTag oldContextTag B32;
956     GLXDrawable drawable B32;
957     GLXDrawable readable B32;
958     GLXContextID context B32;
959 } xGLXMakeCurrentReadSGIReq;
960 #define sz_xGLXMakeCurrentReadSGIReq 24
961
962 typedef struct {
963     BYTE        type;                   /* X_Reply */
964     CARD8       unused;                 /* not used */
965     CARD16      sequenceNumber B16;
966     CARD32      length B32;
967     GLXContextTag contextTag B32;
968     CARD32      writeVid B32;
969     CARD32      writeType B32;
970     CARD32      readVid B32;
971     CARD32      readType B32;
972     CARD32      pad6 B32;
973 } xGLXMakeCurrentReadSGIReply;
974 #define sz_xGLXMakeCurrentReadSGIReply 32
975
976 /*
977 ** glXGetFBConfigsSGIX request
978 */
979 typedef struct GLXGetFBConfigsSGIX {
980     CARD8       reqType;
981     CARD8       glxCode;
982     CARD16      length B16;
983     CARD32      vendorCode B32;         /* vendor-specific opcode */
984     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
985     CARD32      screen B32;
986 } xGLXGetFBConfigsSGIXReq;
987 #define sz_xGLXGetFBConfigsSGIXReq 16
988
989 /*
990 ** glXCreateContextWithConfigSGIX request
991 */
992
993 typedef struct GLXCreateContextWithConfigSGIX {
994     CARD8       reqType;
995     CARD8       glxCode;
996     CARD16      length B16;
997     CARD32      vendorCode B32;         /* vendor-specific opcode */
998     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
999     GLXContextID context B32;
1000     GLXFBConfigID fbconfig B32;
1001     CARD32      screen B32;
1002     CARD32      renderType;
1003     GLXContextID shareList B32;
1004     BOOL        isDirect;
1005     CARD8       reserved1;
1006     CARD16      reserved2 B16;
1007 } xGLXCreateContextWithConfigSGIXReq;
1008 #define sz_xGLXCreateContextWithConfigSGIXReq 36
1009
1010 /*
1011 ** glXCreatePixmapWithConfigSGIX request
1012 */
1013
1014 typedef struct GLXCreateGLXPixmapWithConfigSGIX {
1015     CARD8       reqType;
1016     CARD8       glxCode;
1017     CARD16      length B16;
1018     CARD32      vendorCode B32;         /* vendor-specific opcode */
1019     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
1020     CARD32      screen B32;
1021     GLXFBConfigID fbconfig B32;
1022     CARD32      pixmap B32;
1023     GLXPixmap   glxpixmap B32;
1024 } xGLXCreateGLXPixmapWithConfigSGIXReq;
1025 #define sz_xGLXCreateGLXPixmapWithConfigSGIXReq 28
1026
1027 /*
1028 ** glXCreateGLXPbufferSGIX request
1029 */
1030 typedef struct GLXCreateGLXPbufferSGIX {
1031     CARD8       reqType;
1032     CARD8       glxCode;
1033     CARD16      length B16;
1034     CARD32      vendorCode B32;         /* vendor-specific opcode */
1035     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
1036     CARD32      screen B32;
1037     GLXFBConfigID fbconfig B32;
1038     GLXPbuffer  pbuffer B32;
1039     CARD32      width B32;
1040     CARD32      height B32;
1041     /* followed by attribute list */
1042 } xGLXCreateGLXPbufferSGIXReq;
1043 #define sz_xGLXCreateGLXPbufferSGIXReq 32
1044
1045 /*
1046 ** glXDestroyGLXPbufferSGIX request
1047 */
1048 typedef struct GLXDestroyGLXPbuffer {
1049     CARD8       reqType;
1050     CARD8       glxCode;
1051     CARD16      length B16;
1052     CARD32      vendorCode B32;         /* vendor-specific opcode */
1053     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
1054     GLXPbuffer  pbuffer B32;
1055 } xGLXDestroyGLXPbufferSGIXReq;
1056 #define sz_xGLXDestroyGLXPbufferSGIXReq 16
1057
1058 /*
1059 ** glXChangeDrawableAttributesSGIX request
1060 */
1061 typedef struct GLXChangeDrawableAttributesSGIX {
1062     CARD8       reqType;
1063     CARD8       glxCode;
1064     CARD16      length B16;
1065     CARD32      vendorCode B32;         /* vendor-specific opcode */
1066     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
1067     GLXDrawable drawable B32;
1068     CARD32      numAttribs B32;
1069     /* followed by attribute list */
1070 } xGLXChangeDrawableAttributesSGIXReq;
1071 #define sz_xGLXChangeDrawableAttributesSGIXReq 20
1072
1073 /*
1074 ** glXGetDrawableAttributesSGIX request
1075 */
1076 typedef struct GLXGetDrawableAttributesSGIX {
1077     CARD8       reqType;
1078     CARD8       glxCode;
1079     CARD16      length B16;
1080     CARD32      vendorCode B32;         /* vendor-specific opcode */
1081     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
1082     GLXDrawable drawable B32;
1083 } xGLXGetDrawableAttributesSGIXReq;
1084 #define sz_xGLXGetDrawableAttributesSGIXReq 16
1085
1086 /*
1087 ** glXGetDrawableAttributesSGIX reply
1088 */
1089 typedef struct {
1090     BYTE        type;                   /* X_Reply */
1091     CARD8       unused;                 /* not used */
1092     CARD16      sequenceNumber B16;
1093     CARD32      length B32;
1094     CARD32      numAttribs B32;
1095     CARD32      pad2 B32;
1096     CARD32      pad3 B32;
1097     CARD32      pad4 B32;
1098     CARD32      pad5 B32;
1099     CARD32      pad6 B32;
1100 } xGLXGetDrawableAttributesSGIXReply;
1101 #define sz_xGLXGetDrawableAttributesSGIXReply 32
1102
1103 /*
1104 ** glXJoinSwapGroupSGIX request
1105 */
1106 typedef struct GLXJoinSwapGroupSGIX {
1107     CARD8       reqType;
1108     CARD8       glxCode;
1109     CARD16      length B16;
1110     CARD32      vendorCode B32;         /* vendor-specific opcode */
1111     CARD32      unused B32;             /* corresponds to contextTag in hdr */
1112     GLXDrawable drawable B32;
1113     GLXDrawable member B32;
1114 } xGLXJoinSwapGroupSGIXReq;
1115 #define sz_xGLXJoinSwapGroupSGIXReq 20
1116
1117 /*
1118 ** glXBindSwapBarrierSGIX request
1119 */
1120 typedef struct GLXBindSwapBarrierSGIX {
1121     CARD8       reqType;
1122     CARD8       glxCode;
1123     CARD16      length B16;
1124     CARD32      vendorCode B32;         /* vendor-specific opcode */
1125     CARD32      unused B32;             /* corresponds to contextTag in hdr */
1126     GLXDrawable drawable B32;
1127     CARD32      barrier B32;
1128 } xGLXBindSwapBarrierSGIXReq;
1129 #define sz_xGLXBindSwapBarrierSGIXReq 20
1130
1131 /*
1132 ** glXQueryMaxSwapBarriersSGIX request
1133 */
1134 typedef struct GLXQueryMaxSwapBarriersSGIX {
1135     CARD8       reqType;
1136     CARD8       glxCode;
1137     CARD16      length B16;
1138     CARD32      vendorCode B32;         /* vendor-specific opcode */
1139     CARD32      unused B32;             /* corresponds to contextTag in hdr */
1140     CARD32      screen B32;
1141 } xGLXQueryMaxSwapBarriersSGIXReq;
1142 #define sz_xGLXQueryMaxSwapBarriersSGIXReq 16
1143
1144 typedef struct {
1145     BYTE        type;                   /* X_Reply */
1146     CARD8       unused;                 /* not used */
1147     CARD16      sequenceNumber B16;
1148     CARD32      length B32;
1149     CARD32      max B32;
1150     CARD32      size B32;
1151     CARD32      pad3 B32;
1152     CARD32      pad4 B32;
1153     CARD32      pad5 B32;
1154     CARD32      pad6 B32;
1155 } xGLXQueryMaxSwapBarriersSGIXReply;
1156 #define sz_xGLXQueryMaxSwapBarriersSGIXReply 32
1157
1158 /*
1159 ** glXQueryHyperpipeNetworkSGIX request
1160 */
1161 typedef struct GLXQueryHyperpipeNetworkSGIX {
1162     CARD8       reqType;
1163     CARD8       glxCode;
1164     CARD16      length B16;
1165     CARD32      vendorCode B32;         /* vendor-specific opcode */
1166     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
1167     CARD32      screen B32;
1168 } xGLXQueryHyperpipeNetworkSGIXReq;
1169 #define sz_xGLXQueryHyperpipeNetworkSGIXReq 16
1170
1171 /*
1172 ** glXQueryHyperpipeNetworkSGIX reply
1173 */
1174 typedef struct {
1175     BYTE        type;                   /* X_Reply */
1176     CARD8       unused;                 /* not used */
1177     CARD16      sequenceNumber B16;
1178     CARD32      length B32;
1179     CARD32      pad1 B32;
1180     CARD32      n B32;
1181     CARD32      npipes B32;             /* NOTE: may hold a single value */
1182     CARD32      pad4 B32;               /* NOTE: may hold half a double */
1183     CARD32      pad5 B32;
1184     CARD32      pad6 B32;
1185 } xGLXQueryHyperpipeNetworkSGIXReply;
1186 #define sz_xGLXQueryHyperpipeNetworkSGIXReply 32
1187
1188 /*
1189 ** glXDestroyHyperpipeConfigSGIX request
1190 */
1191 typedef struct GLXDestroyHyperpipeConfigSGIX {
1192     CARD8       reqType;
1193     CARD8       glxCode;
1194     CARD16      length B16;
1195     CARD32      vendorCode B32;         /* vendor-specific opcode */
1196     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
1197     CARD32      screen B32;
1198     CARD32      hpId B32;
1199     CARD32      pad2 B32;
1200     CARD32      pad3 B32;
1201     CARD32      pad4 B32;
1202 } xGLXDestroyHyperpipeConfigSGIXReq;
1203 #define sz_xGLXDestroyHyperpipeConfigSGIXReq 32
1204
1205 /*
1206 ** glXDestroyHyperpipeConfigSGIX reply
1207 */
1208 typedef struct {
1209     BYTE        type;                   /* X_Reply */
1210     CARD8       unused;                 /* not used */
1211     CARD16      sequenceNumber B16;
1212     CARD32      length B32;
1213     CARD32      pad1 B32;
1214     CARD32      n B32;
1215     CARD32      success B32;            /* NOTE: may hold a single value */
1216     CARD32      pad4 B32;               /* NOTE: may hold half a double */
1217     CARD32      pad5 B32;
1218     CARD32      pad6 B32;
1219 } xGLXDestroyHyperpipeConfigSGIXReply;
1220 #define sz_xGLXDestroyHyperpipeConfigSGIXReply 32
1221
1222 /*
1223 ** glXQueryHyperpipeConfigSGIX request
1224 */
1225 typedef struct GLXQueryHyperpipeConfigSGIX {
1226     CARD8       reqType;
1227     CARD8       glxCode;
1228     CARD16      length B16;
1229     CARD32      vendorCode B32;         /* vendor-specific opcode */
1230     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
1231     CARD32      screen B32;
1232     CARD32      hpId B32;
1233     CARD32      pad2 B32;
1234     CARD32      pad3 B32;
1235     CARD32      pad4 B32;
1236 } xGLXQueryHyperpipeConfigSGIXReq;
1237 #define sz_xGLXQueryHyperpipeConfigSGIXReq 32
1238
1239 /*
1240 ** glXQueryHyperpipeConfigSGIX reply
1241 */
1242 typedef struct {
1243     BYTE        type;                   /* X_Reply */
1244     CARD8       unused;                 /* not used */
1245     CARD16      sequenceNumber B16;
1246     CARD32      length B32;
1247     CARD32      pad1 B32;
1248     CARD32      n B32;
1249     CARD32      npipes B32;
1250     CARD32      pad4 B32;
1251     CARD32      pad5 B32;
1252     CARD32      pad6 B32;
1253 } xGLXQueryHyperpipeConfigSGIXReply;
1254 #define sz_xGLXQueryHyperpipeConfigSGIXReply 32
1255
1256 /*
1257 ** glXHyperpipeConfigSGIX request
1258 */
1259 typedef struct {
1260     CARD8       reqType;
1261     CARD8       glxCode;
1262     CARD16      length B16;
1263     CARD32      vendorCode B32;         /* vendor-specific opcode */
1264     CARD32      pad1 B32;   /* unused; corresponds to contextTag in header */
1265     CARD32      screen B32;
1266     CARD32      npipes B32;
1267     CARD32      networkId B32;
1268     CARD32      pad2 B32;
1269     CARD32      pad3 B32;
1270     /* followed by attribute list */
1271 } xGLXHyperpipeConfigSGIXReq;
1272 #define sz_xGLXHyperpipeConfigSGIXReq 32
1273
1274 /*
1275 ** glXHyperpipeConfigSGIX reply
1276 */
1277 typedef struct {
1278     BYTE        type;                   /* X_Reply */
1279     CARD8       unused;                 /* not used */
1280     CARD16      sequenceNumber B16;
1281     CARD32      length B32;
1282     CARD32      pad1 B32;
1283     CARD32      n B32;
1284     CARD32      npipes B32;
1285     CARD32      hpId B32;
1286     CARD32      pad5 B32;
1287     CARD32      pad6 B32;
1288 } xGLXHyperpipeConfigSGIXReply;
1289 #define sz_xGLXHyperpipeConfigSGIXReply 32
1290
1291 /**
1292  * \name Protocol structures for GLX_ARB_create_context and
1293  * GLX_ARB_create_context_profile
1294  */
1295 /*@{*/
1296 /**
1297  * Protocol header for glXSetClientInfoARB
1298  *
1299  * This structure is follwed by \c numVersions * 2 \c CARD32 values listing
1300  * the OpenGL versions supported by the client.  The pairs of values are an
1301  * OpenGL major version followed by a minor version.  For example,
1302  *
1303  *      CARD32 versions[4] = { 2, 1, 3, 0 };
1304  *
1305  * says that the client supports OpenGL 2.1 and OpenGL 3.0.
1306  * 
1307  * These are followed by \c numGLExtensionBytes bytes of \c STRING8 containing
1308  * the OpenGL extension string supported by the client and up to 3 bytes of
1309  * padding.
1310  *
1311  * The list of OpenGL extensions is followed by \c numGLXExtensionBytes bytes
1312  * of \c STRING8 containing the GLX extension string supported by the client
1313  * and up to 3 bytes of padding.
1314  *
1315  * This protocol replaces \c GLXClientInfo.
1316  *
1317  * \sa GLXClientInfo, GLXSetClientInfo2ARB
1318  */
1319 typedef struct GLXSetClientInfoARB {
1320     CARD8       reqType;
1321     CARD8       glxCode;
1322     CARD16      length B16;
1323     CARD32      major B32;
1324     CARD32      minor B32;
1325     CARD32      numVersions B32;
1326     CARD32      numGLExtensionBytes B32;
1327     CARD32      numGLXExtensionBytes B32;
1328     /*
1329     ** More data may follow; this is just the header.
1330     */
1331 } xGLXSetClientInfoARBReq;
1332 #define sz_xGLXSetClientInfoARBReq 24
1333
1334 /**
1335  * Protocol head for glXCreateContextAttribsARB
1336  *
1337  * This protocol replaces \c GLXCreateContext, \c GLXCreateNewContext, and
1338  * \c GLXCreateContextWithConfigSGIX.
1339  */
1340 typedef struct GLXCreateContextAttribsARB {
1341     CARD8       reqType;
1342     CARD8       glxCode;
1343     CARD16      length B16;
1344     GLXContextID        context B32;
1345     GLXFBConfigID       fbconfig B32;
1346     CARD32      screen;
1347     GLXContextID        shareList B32;
1348     BOOL        isDirect;
1349     CARD8       reserved1;
1350     CARD16      reserved2 B16;
1351     CARD32      numAttribs B32;
1352     /* followed by attribute list */
1353 } xGLXCreateContextAttribsARBReq;
1354 #define sz_xGLXCreateContextAttribsARBReq 28
1355
1356 /**
1357  * Protocol header for glXSetClientInfo2ARB
1358  *
1359  * The glXSetClientInfo2ARB protocol differs from glXSetClientInfoARB in that
1360  * the list of OpenGL versions supported by the client is 3 \c CARD32 values
1361  * per version: major version, minor version, and supported profile mask.
1362  *
1363  * This protocol replaces \c GLXClientInfo and \c GLXSetClientInfoARB.
1364  *
1365  * \sa GLXClientInfo, GLXSetClientInfoARB
1366  */
1367 typedef struct GLXSetClientInfo2ARB {
1368     CARD8       reqType;
1369     CARD8       glxCode;
1370     CARD16      length B16;
1371     CARD32      major B32;
1372     CARD32      minor B32;
1373     CARD32      numVersions B32;
1374     CARD32      numGLExtensionBytes B32;
1375     CARD32      numGLXExtensionBytes B32;
1376     /*
1377     ** More data may follow; this is just the header.
1378     */
1379 } xGLXSetClientInfo2ARBReq;
1380 #define sz_xGLXSetClientInfo2ARBReq 24
1381 /*@}*/
1382
1383 /************************************************************************/
1384
1385 /*
1386 ** Events
1387 */
1388
1389 typedef struct {
1390     BYTE type;
1391     BYTE pad;
1392     CARD16 sequenceNumber B16;
1393     CARD16 event_type B16;  /*** was clobber_class */
1394     CARD16 draw_type B16;
1395     CARD32 drawable B32;
1396     CARD32 buffer_mask B32; /*** was mask */
1397     CARD16 aux_buffer B16;
1398     CARD16 x B16;
1399     CARD16 y B16;
1400     CARD16 width B16;
1401     CARD16 height B16;
1402     CARD16 count B16;
1403     CARD32 unused2 B32;
1404 } xGLXPbufferClobberEvent;
1405
1406 typedef struct {
1407     BYTE type;
1408     BYTE pad;
1409     CARD16 sequenceNumber B16;
1410     CARD16 event_type B16;
1411     CARD32 drawable;
1412     CARD32 ust_hi B32;
1413     CARD32 ust_lo B32;
1414     CARD32 msc_hi B32;
1415     CARD32 msc_lo B32;
1416     CARD32 sbc_hi B32;
1417     CARD32 sbc_lo B32;
1418 } xGLXBufferSwapComplete;
1419
1420 typedef struct {
1421     BYTE type;
1422     BYTE pad;
1423     CARD16 sequenceNumber B16;
1424     CARD16 event_type B16;
1425     CARD16 pad2;
1426     CARD32 drawable;
1427     CARD32 ust_hi B32;
1428     CARD32 ust_lo B32;
1429     CARD32 msc_hi B32;
1430     CARD32 msc_lo B32;
1431     CARD32 sbc B32;
1432 } xGLXBufferSwapComplete2;
1433
1434 /************************************************************************/
1435
1436 /*
1437 ** Size of the standard X request header.
1438 */
1439 #define __GLX_SINGLE_HDR_SIZE sz_xGLXSingleReq
1440 #define __GLX_VENDPRIV_HDR_SIZE sz_xGLXVendorPrivateReq
1441
1442 #define __GLX_RENDER_HDR    \
1443     CARD16      length B16; \
1444     CARD16      opcode B16
1445
1446 #define __GLX_RENDER_HDR_SIZE 4
1447
1448 typedef struct {
1449     __GLX_RENDER_HDR;
1450 } __GLXrenderHeader;
1451
1452 #define __GLX_RENDER_LARGE_HDR \
1453     CARD32      length B32;    \
1454     CARD32      opcode B32
1455
1456 #define __GLX_RENDER_LARGE_HDR_SIZE 8
1457
1458 typedef struct {
1459     __GLX_RENDER_LARGE_HDR;
1460 } __GLXrenderLargeHeader;
1461
1462 /*
1463 ** The glBitmap, glPolygonStipple, glTexImage[12]D, glTexSubImage[12]D
1464 ** and glDrawPixels calls all have a pixel header transmitted after the
1465 ** Render or RenderLarge header and before their own opcode specific
1466 ** headers.
1467 */
1468 #define __GLX_PIXEL_HDR         \
1469     BOOL        swapBytes;      \
1470     BOOL        lsbFirst;       \
1471     CARD8       reserved0;      \
1472     CARD8       reserved1;      \
1473     CARD32      rowLength B32;  \
1474     CARD32      skipRows B32;   \
1475     CARD32      skipPixels B32; \
1476     CARD32      alignment B32
1477
1478 #define __GLX_PIXEL_HDR_SIZE 20
1479
1480 typedef struct {
1481     __GLX_PIXEL_HDR;
1482 } __GLXpixelHeader;
1483
1484 /*
1485 ** glTexImage[34]D and glTexSubImage[34]D calls
1486 ** all have a pixel header transmitted after the Render or RenderLarge
1487 ** header and before their own opcode specific headers.
1488 */
1489 #define __GLX_PIXEL_3D_HDR              \
1490     BOOL        swapBytes;              \
1491     BOOL        lsbFirst;               \
1492     CARD8       reserved0;              \
1493     CARD8       reserved1;              \
1494     CARD32      rowLength B32;          \
1495     CARD32      imageHeight B32;        \
1496     CARD32      imageDepth B32;         \
1497     CARD32      skipRows B32;           \
1498     CARD32      skipImages B32;         \
1499     CARD32      skipVolumes B32;        \
1500     CARD32      skipPixels B32;         \
1501     CARD32      alignment B32
1502
1503 #define __GLX_PIXEL_3D_HDR_SIZE 36
1504
1505 /*
1506 ** Data that is specific to a glBitmap call.  The data is sent in the
1507 ** following order:
1508 **      Render or RenderLarge header
1509 **      Pixel header
1510 **      Bitmap header
1511 */
1512 #define __GLX_BITMAP_HDR    \
1513     CARD32      width B32;  \
1514     CARD32      height B32; \
1515     FLOAT32     xorig F32;  \
1516     FLOAT32     yorig F32;  \
1517     FLOAT32     xmove F32;  \
1518     FLOAT32     ymove F32
1519
1520 typedef struct {
1521     __GLX_RENDER_HDR;
1522     __GLX_PIXEL_HDR;
1523     __GLX_BITMAP_HDR;
1524 } __GLXbitmapHeader;
1525
1526 typedef struct {
1527     __GLX_RENDER_LARGE_HDR;
1528     __GLX_PIXEL_HDR;
1529     __GLX_BITMAP_HDR;
1530 } __GLXbitmapLargeHeader;
1531
1532 typedef struct {
1533     __GLX_PIXEL_HDR;
1534     __GLX_BITMAP_HDR;
1535 } __GLXdispatchBitmapHeader;
1536
1537 #define __GLX_BITMAP_HDR_SIZE 24
1538
1539 #define __GLX_BITMAP_CMD_HDR_SIZE \
1540     (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_BITMAP_HDR_SIZE)
1541
1542 #define __GLX_BITMAP_CMD_DISPATCH_HDR_SIZE \
1543     (__GLX_PIXEL_HDR_SIZE + __GLX_BITMAP_HDR_SIZE)
1544
1545 typedef struct {
1546     __GLX_RENDER_HDR;
1547     __GLX_PIXEL_HDR;
1548 } __GLXpolygonStippleHeader;
1549
1550 #define __GLX_POLYGONSTIPPLE_CMD_HDR_SIZE \
1551     (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE)
1552
1553 /*
1554 ** Data that is specific to a glTexImage1D or glTexImage2D call.  The
1555 ** data is sent in the following order:
1556 **      Render or RenderLarge header
1557 **      Pixel header
1558 **      TexImage header
1559 ** When a glTexImage1D call the height field is unexamined by the server.
1560 */
1561 #define __GLX_TEXIMAGE_HDR      \
1562     CARD32      target B32;     \
1563     CARD32      level B32;      \
1564     CARD32      components B32; \
1565     CARD32      width B32;      \
1566     CARD32      height B32;     \
1567     CARD32      border B32;     \
1568     CARD32      format B32;     \
1569     CARD32      type B32
1570
1571 #define __GLX_TEXIMAGE_HDR_SIZE 32
1572
1573 #define __GLX_TEXIMAGE_CMD_HDR_SIZE \
1574     (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_TEXIMAGE_HDR_SIZE)
1575
1576 #define __GLX_TEXIMAGE_CMD_DISPATCH_HDR_SIZE \
1577     (__GLX_PIXEL_HDR_SIZE + __GLX_TEXIMAGE_HDR_SIZE)
1578
1579 typedef struct {
1580     __GLX_RENDER_HDR;
1581     __GLX_PIXEL_HDR;
1582     __GLX_TEXIMAGE_HDR;
1583 } __GLXtexImageHeader;
1584
1585 typedef struct {
1586     __GLX_RENDER_LARGE_HDR;
1587     __GLX_PIXEL_HDR;
1588     __GLX_TEXIMAGE_HDR;
1589 } __GLXtexImageLargeHeader;
1590
1591 typedef struct {
1592     __GLX_PIXEL_HDR;
1593     __GLX_TEXIMAGE_HDR;
1594 } __GLXdispatchTexImageHeader;
1595
1596 /*
1597 ** Data that is specific to a glTexImage3D or glTexImage4D call.  The
1598 ** data is sent in the following order:
1599 **      Render or RenderLarge header
1600 **      Pixel 3D header
1601 **      TexImage 3D header
1602 ** When a glTexImage3D call the size4d and woffset fields are unexamined
1603 ** by the server.
1604 ** Could be used by all TexImage commands and perhaps should be in the
1605 ** future.
1606 */
1607 #define __GLX_TEXIMAGE_3D_HDR \
1608     CARD32      target B32;     \
1609     CARD32      level B32;      \
1610     CARD32      internalformat B32;     \
1611     CARD32      width B32;      \
1612     CARD32      height B32;     \
1613     CARD32      depth B32;      \
1614     CARD32      size4d B32;     \
1615     CARD32      border B32;     \
1616     CARD32      format B32;     \
1617     CARD32      type B32;       \
1618     CARD32      nullimage B32
1619
1620 #define __GLX_TEXIMAGE_3D_HDR_SIZE 44
1621
1622 #define __GLX_TEXIMAGE_3D_CMD_HDR_SIZE \
1623     (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \
1624                 __GLX_TEXIMAGE_3D_HDR_SIZE)
1625
1626 #define __GLX_TEXIMAGE_3D_CMD_DISPATCH_HDR_SIZE \
1627     (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXIMAGE_3D_HDR_SIZE)
1628
1629 typedef struct {
1630     __GLX_RENDER_HDR;
1631     __GLX_PIXEL_3D_HDR;
1632     __GLX_TEXIMAGE_3D_HDR;
1633 } __GLXtexImage3DHeader;
1634
1635 typedef struct {
1636     __GLX_RENDER_LARGE_HDR;
1637     __GLX_PIXEL_3D_HDR;
1638     __GLX_TEXIMAGE_3D_HDR;
1639 } __GLXtexImage3DLargeHeader;
1640
1641 typedef struct {
1642     __GLX_PIXEL_3D_HDR;
1643     __GLX_TEXIMAGE_3D_HDR;
1644 } __GLXdispatchTexImage3DHeader;
1645
1646 /*
1647 ** Data that is specific to a glTexSubImage1D or glTexSubImage2D call.  The
1648 ** data is sent in the following order:
1649 **      Render or RenderLarge header
1650 **      Pixel header
1651 **      TexSubImage header
1652 ** When a glTexSubImage1D call is made, the yoffset and height fields
1653 ** are unexamined by the server and are  considered to be padding.
1654 */
1655 #define __GLX_TEXSUBIMAGE_HDR   \
1656     CARD32      target B32;     \
1657     CARD32      level B32;      \
1658     CARD32      xoffset B32;    \
1659     CARD32      yoffset B32;    \
1660     CARD32      width B32;      \
1661     CARD32      height B32;     \
1662     CARD32      format B32;     \
1663     CARD32      type B32;       \
1664     CARD32      nullImage       \
1665
1666 #define __GLX_TEXSUBIMAGE_HDR_SIZE 36
1667
1668 #define __GLX_TEXSUBIMAGE_CMD_HDR_SIZE \
1669     (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_TEXSUBIMAGE_HDR_SIZE)
1670
1671 #define __GLX_TEXSUBIMAGE_CMD_DISPATCH_HDR_SIZE \
1672     (__GLX_PIXEL_HDR_SIZE + __GLX_TEXSUBIMAGE_HDR_SIZE)
1673
1674 typedef struct {
1675     __GLX_RENDER_HDR;
1676     __GLX_PIXEL_HDR;
1677     __GLX_TEXSUBIMAGE_HDR;
1678 } __GLXtexSubImageHeader;
1679
1680 typedef struct {
1681     __GLX_RENDER_LARGE_HDR;
1682     __GLX_PIXEL_HDR;
1683     __GLX_TEXSUBIMAGE_HDR;
1684 } __GLXtexSubImageLargeHeader;
1685
1686 typedef struct {
1687     __GLX_PIXEL_HDR;
1688     __GLX_TEXSUBIMAGE_HDR;
1689 } __GLXdispatchTexSubImageHeader;
1690
1691 /*
1692 ** Data that is specific to a glTexSubImage3D and 4D calls.  The
1693 ** data is sent in the following order:
1694 **      Render or RenderLarge header
1695 **      Pixel 3D header
1696 **      TexSubImage 3D header
1697 ** When a glTexSubImage3D call is made, the woffset and size4d fields
1698 ** are unexamined by the server and are considered to be padding.
1699 */
1700 #define __GLX_TEXSUBIMAGE_3D_HDR        \
1701     CARD32      target B32;     \
1702     CARD32      level B32;      \
1703     CARD32      xoffset B32;    \
1704     CARD32      yoffset B32;    \
1705     CARD32      zoffset B32;    \
1706     CARD32      woffset B32;    \
1707     CARD32      width B32;      \
1708     CARD32      height B32;     \
1709     CARD32      depth B32;      \
1710     CARD32      size4d B32;     \
1711     CARD32      format B32;     \
1712     CARD32      type B32;       \
1713     CARD32      nullImage       \
1714
1715 #define __GLX_TEXSUBIMAGE_3D_HDR_SIZE 52
1716
1717 #define __GLX_TEXSUBIMAGE_3D_CMD_HDR_SIZE \
1718     (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \
1719                 __GLX_TEXSUBIMAGE_3D_HDR_SIZE)
1720
1721 #define __GLX_TEXSUBIMAGE_3D_CMD_DISPATCH_HDR_SIZE \
1722     (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXSUBIMAGE_3D_HDR_SIZE)
1723
1724 typedef struct {
1725     __GLX_RENDER_HDR;
1726     __GLX_PIXEL_3D_HDR;
1727     __GLX_TEXSUBIMAGE_3D_HDR;
1728 } __GLXtexSubImage3DHeader;
1729
1730 typedef struct {
1731     __GLX_RENDER_LARGE_HDR;
1732     __GLX_PIXEL_3D_HDR;
1733     __GLX_TEXSUBIMAGE_3D_HDR;
1734 } __GLXtexSubImage3DLargeHeader;
1735
1736 typedef struct {
1737     __GLX_PIXEL_3D_HDR;
1738     __GLX_TEXSUBIMAGE_3D_HDR;
1739 } __GLXdispatchTexSubImage3DHeader;
1740
1741 /**
1742  * Data that is specific to a \c glCompressedTexImage1D or
1743  * \c glCompressedTexImage2D call.  The data is sent in the following
1744  * order:
1745  *     - Render or RenderLarge header
1746  *     - CompressedTexImage header
1747  * 
1748  * When a \c glCompressedTexImage1D call is made, the \c height field is
1749  * not examined by the server and is considered padding.
1750  */
1751
1752 #define __GLX_COMPRESSED_TEXIMAGE_HDR \
1753     CARD32     target B32;            \
1754     CARD32     level B32;             \
1755     CARD32     internalFormat B32;    \
1756     CARD32     width B32;             \
1757     CARD32     height B32;            \
1758     CARD32     border B32;            \
1759     CARD32     imageSize B32
1760
1761 #define __GLX_COMPRESSED_TEXIMAGE_HDR_SIZE 28
1762
1763 #define __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE \
1764     (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXIMAGE_HDR_SIZE)
1765
1766 #define __GLX_COMPRESSED_TEXIMAGE_DISPATCH_HDR_SIZE \
1767     (__GLX_COMPRESSED_TEXIMAGE_HDR_SIZE)
1768
1769 typedef struct {
1770     __GLX_RENDER_HDR;
1771     __GLX_COMPRESSED_TEXIMAGE_HDR;
1772 } __GLXcompressedTexImageHeader;
1773
1774 typedef struct {
1775     __GLX_RENDER_LARGE_HDR;
1776     __GLX_COMPRESSED_TEXIMAGE_HDR;
1777 } __GLXcompressedTexImageLargeHeader;
1778
1779 typedef struct {
1780     __GLX_COMPRESSED_TEXIMAGE_HDR;
1781 } __GLXdispatchCompressedTexImageHeader;
1782
1783 /**
1784  * Data that is specifi to a \c glCompressedTexSubImage1D or
1785  * \c glCompressedTexSubImage2D call.  The data is sent in the following
1786  * order:
1787  *     - Render or RenderLarge header
1788  *     - CompressedTexSubImage header
1789  * 
1790  * When a \c glCompressedTexSubImage1D call is made, the \c yoffset and
1791  * \c height fields are not examined by the server and are considered padding.
1792  */
1793
1794 #define __GLX_COMPRESSED_TEXSUBIMAGE_HDR \
1795     CARD32     target B32;            \
1796     CARD32     level B32;             \
1797     CARD32     xoffset B32;           \
1798     CARD32     yoffset B32;           \
1799     CARD32     width B32;             \
1800     CARD32     height B32;            \
1801     CARD32     format B32;            \
1802     CARD32     imageSize B32
1803
1804 #define __GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE 32
1805
1806 #define __GLX_COMPRESSED_TEXSUBIMAGE_CMD_HDR_SIZE \
1807     (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE)
1808
1809 #define __GLX_COMPRESSED_TEXSUBIMAGE_DISPATCH_HDR_SIZE \
1810     (__GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE)
1811
1812 typedef struct {
1813     __GLX_RENDER_HDR;
1814     __GLX_COMPRESSED_TEXSUBIMAGE_HDR;
1815 } __GLXcompressedTexSubImageHeader;
1816
1817 typedef struct {
1818     __GLX_RENDER_LARGE_HDR;
1819     __GLX_COMPRESSED_TEXSUBIMAGE_HDR;
1820 } __GLXcompressedTexSubImageLargeHeader;
1821
1822 typedef struct {
1823     __GLX_COMPRESSED_TEXSUBIMAGE_HDR;
1824 } __GLXdispatchCompressedTexSubImageHeader;
1825
1826 /**
1827  * Data that is specific to a \c glCompressedTexImage3D call.  The data is
1828  * sent in the following order:
1829  *     - Render or RenderLarge header
1830  *     - CompressedTexImage3D header
1831  */
1832
1833 #define __GLX_COMPRESSED_TEXIMAGE_3D_HDR \
1834     CARD32     target B32;            \
1835     CARD32     level B32;             \
1836     CARD32     internalFormat B32;    \
1837     CARD32     width B32;             \
1838     CARD32     height B32;            \
1839     CARD32     depth B32;             \
1840     CARD32     border B32;            \
1841     CARD32     imageSize B32
1842
1843 #define __GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE 32
1844
1845 #define __GLX_COMPRESSED_TEXIMAGE_3D_CMD_HDR_SIZE \
1846     (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE)
1847
1848 #define __GLX_COMPRESSED_TEXIMAGE_3D_DISPATCH_HDR_SIZE \
1849     (__GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE)
1850
1851 typedef struct {
1852     __GLX_RENDER_HDR;
1853     __GLX_COMPRESSED_TEXIMAGE_3D_HDR;
1854 } __GLXcompressedTexImage3DHeader;
1855
1856 typedef struct {
1857     __GLX_RENDER_LARGE_HDR;
1858     __GLX_COMPRESSED_TEXIMAGE_3D_HDR;
1859 } __GLXcompressedTexImage3DLargeHeader;
1860
1861 typedef struct {
1862     __GLX_COMPRESSED_TEXIMAGE_3D_HDR;
1863 } __GLXdispatchCompressedTexImage3DHeader;
1864
1865 /**
1866  * Data that is specifi to a \c glCompressedTexSubImage3D call.  The data is
1867  * sent in the following order:
1868  *     - Render or RenderLarge header
1869  *     - CompressedTexSubImage3D header
1870  */
1871
1872 #define __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR \
1873     CARD32     target B32;            \
1874     CARD32     level B32;             \
1875     CARD32     xoffset B32;           \
1876     CARD32     yoffset B32;           \
1877     CARD32     zoffset B32;           \
1878     CARD32     width B32;             \
1879     CARD32     height B32;            \
1880     CARD32     depth B32;             \
1881     CARD32     format B32;            \
1882     CARD32     imageSize B32
1883
1884 #define __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE 32
1885
1886 #define __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE \
1887     (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE)
1888
1889 #define __GLX_COMPRESSED_TEXSUBIMAGE_3D_DISPATCH_HDR_SIZE \
1890     (__GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE)
1891
1892 typedef struct {
1893     __GLX_RENDER_HDR;
1894     __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR;
1895 } __GLXcompressedTexSubImage3DHeader;
1896
1897 typedef struct {
1898     __GLX_RENDER_LARGE_HDR;
1899     __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR;
1900 } __GLXcompressedTexSubImage3DLargeHeader;
1901
1902 typedef struct {
1903     __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR;
1904 } __GLXdispatchCompressedTexSubImage3DHeader;
1905
1906 /*
1907 ** Data that is specific to a glDrawPixels call.  The data is sent in the
1908 ** following order:
1909 **      Render or RenderLarge header
1910 **      Pixel header
1911 **      DrawPixels header
1912 */
1913 #define __GLX_DRAWPIXELS_HDR \
1914     CARD32      width B32;   \
1915     CARD32      height B32;  \
1916     CARD32      format B32;  \
1917     CARD32      type B32
1918
1919 #define __GLX_DRAWPIXELS_HDR_SIZE 16
1920
1921 #define __GLX_DRAWPIXELS_CMD_HDR_SIZE \
1922     (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_DRAWPIXELS_HDR_SIZE)
1923
1924 #define __GLX_DRAWPIXELS_CMD_DISPATCH_HDR_SIZE \
1925     (__GLX_PIXEL_HDR_SIZE + __GLX_DRAWPIXELS_HDR_SIZE)
1926
1927 typedef struct {
1928     __GLX_RENDER_HDR;
1929     __GLX_PIXEL_HDR;
1930     __GLX_DRAWPIXELS_HDR;
1931 } __GLXdrawPixelsHeader;
1932
1933 typedef struct {
1934     __GLX_RENDER_LARGE_HDR;
1935     __GLX_PIXEL_HDR;
1936     __GLX_DRAWPIXELS_HDR;
1937 } __GLXdrawPixelsLargeHeader;
1938
1939 typedef struct {
1940     __GLX_PIXEL_HDR;
1941     __GLX_DRAWPIXELS_HDR;
1942 } __GLXdispatchDrawPixelsHeader;
1943
1944 /*
1945 ** Data that is specific to a glConvolutionFilter1D or glConvolutionFilter2D
1946 ** call.  The data is sent in the following order:
1947 **      Render or RenderLarge header
1948 **      Pixel header
1949 **      ConvolutionFilter header
1950 ** When a glConvolutionFilter1D call the height field is unexamined by the server.
1951 */
1952 #define __GLX_CONV_FILT_HDR     \
1953     CARD32      target B32;     \
1954     CARD32      internalformat B32;     \
1955     CARD32      width B32;      \
1956     CARD32      height B32;     \
1957     CARD32      format B32;     \
1958     CARD32      type B32
1959
1960 #define __GLX_CONV_FILT_HDR_SIZE 24
1961
1962 #define __GLX_CONV_FILT_CMD_HDR_SIZE \
1963     (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE)
1964
1965 #define __GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE \
1966     (__GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE)
1967 typedef struct {
1968     __GLX_RENDER_HDR;
1969     __GLX_PIXEL_HDR;
1970     __GLX_CONV_FILT_HDR;
1971 } __GLXConvolutionFilterHeader;
1972
1973 typedef struct {
1974     __GLX_RENDER_LARGE_HDR;
1975     __GLX_PIXEL_HDR;
1976     __GLX_CONV_FILT_HDR;
1977 } __GLXConvolutionFilterLargeHeader;
1978
1979 typedef struct {
1980     __GLX_PIXEL_HDR;
1981     __GLX_CONV_FILT_HDR;
1982 } __GLXdispatchConvolutionFilterHeader;
1983
1984 /*
1985 ** Data that is specific to a glDrawArraysEXT call.  The data is sent in the
1986 ** following order:
1987 **      Render or RenderLarge header
1988 **      Draw Arrays header
1989 **      a variable number of Component headers
1990 **      vertex data for each component type
1991 */
1992
1993 #define __GLX_DRAWARRAYS_HDR \
1994     CARD32      numVertexes B32; \
1995     CARD32      numComponents B32; \
1996     CARD32      primType B32
1997
1998 #define __GLX_DRAWARRAYS_HDR_SIZE 12
1999
2000 #define __GLX_DRAWARRAYS_CMD_HDR_SIZE \
2001     (__GLX_RENDER_HDR_SIZE + __GLX_DRAWARRAYS_HDR_SIZE)
2002
2003 typedef struct {
2004     __GLX_RENDER_HDR;
2005     __GLX_DRAWARRAYS_HDR;
2006 } __GLXdrawArraysHeader;
2007
2008 typedef struct {
2009     __GLX_RENDER_LARGE_HDR;
2010     __GLX_DRAWARRAYS_HDR;
2011 } __GLXdrawArraysLargeHeader;
2012
2013 typedef struct {
2014     __GLX_DRAWARRAYS_HDR;
2015 } __GLXdispatchDrawArraysHeader;
2016
2017 #define __GLX_COMPONENT_HDR \
2018     CARD32      datatype B32; \
2019     INT32       numVals B32; \
2020     CARD32      component B32
2021
2022 typedef struct {
2023     __GLX_COMPONENT_HDR;
2024 } __GLXdispatchDrawArraysComponentHeader;
2025
2026 #define __GLX_COMPONENT_HDR_SIZE 12
2027
2028 /*
2029 ** Data that is specific to a glColorTable call
2030 **      The data is sent in the following order:
2031 **      Render or RenderLarge header
2032 **      Pixel header
2033 **      ColorTable header
2034 */
2035
2036 #define __GLX_COLOR_TABLE_HDR        \
2037     CARD32      target B32;         \
2038     CARD32      internalformat B32; \
2039     CARD32      width B32;          \
2040     CARD32      format B32;         \
2041     CARD32      type   B32
2042
2043 #define __GLX_COLOR_TABLE_HDR_SIZE 20
2044
2045 #define __GLX_COLOR_TABLE_CMD_HDR_SIZE \
2046     (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_COLOR_TABLE_HDR_SIZE)
2047
2048 typedef struct {
2049     __GLX_RENDER_HDR;
2050     __GLX_PIXEL_HDR;
2051     __GLX_COLOR_TABLE_HDR;
2052 } __GLXColorTableHeader;
2053
2054 typedef struct {
2055     __GLX_RENDER_LARGE_HDR;
2056     __GLX_PIXEL_HDR;
2057     __GLX_COLOR_TABLE_HDR;
2058 } __GLXColorTableLargeHeader;
2059
2060 typedef struct {
2061     __GLX_PIXEL_HDR;
2062     __GLX_COLOR_TABLE_HDR;
2063 } __GLXdispatchColorTableHeader;
2064
2065 /*
2066 ** Data that is specific to a glColorSubTable call
2067 **      The data is sent in the following order:
2068 **      Render or RenderLarge header
2069 **      Pixel header
2070 **      ColorTable header
2071 */
2072
2073 #define __GLX_COLOR_SUBTABLE_HDR    \
2074     CARD32      target B32;         \
2075     CARD32      start B32;          \
2076     CARD32      count B32;          \
2077     CARD32      format B32;         \
2078     CARD32      type   B32
2079
2080 #define __GLX_COLOR_SUBTABLE_HDR_SIZE 20
2081
2082 #define __GLX_COLOR_SUBTABLE_CMD_HDR_SIZE \
2083     (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + \
2084      __GLX_COLOR_SUBTABLE_HDR_SIZE)
2085
2086 typedef struct {
2087     __GLX_RENDER_HDR;
2088     __GLX_PIXEL_HDR;
2089     __GLX_COLOR_SUBTABLE_HDR;
2090 } __GLXColorSubTableHeader;
2091
2092 typedef struct {
2093     __GLX_RENDER_LARGE_HDR;
2094     __GLX_PIXEL_HDR;
2095     __GLX_COLOR_SUBTABLE_HDR;
2096 } __GLXColorSubTableLargeHeader;
2097
2098 typedef struct {
2099     __GLX_PIXEL_HDR;
2100     __GLX_COLOR_SUBTABLE_HDR;
2101 } __GLXdispatchColorSubTableHeader;
2102
2103 #define GLX_WINDOW_TYPE         1
2104 #define GLX_PIXMAP_TYPE         2
2105 #define GLX_VIDEO_SOURCE_TYPE   3
2106 #define GLX_PBUFFER_TYPE        4
2107 /* 5 is for DM_PBUFFER */
2108 #define GLX_GLXWINDOW_TYPE      6       
2109
2110 /*****************************************************************************/
2111
2112 /*
2113 ** Restore these definitions back to the typedefs in glx.h
2114 */
2115 #undef GLXContextID
2116 #undef GLXPixmap
2117 #undef GLXDrawable
2118 #undef GLXPbuffer
2119 #undef GLXWindow
2120 #undef GLXFBConfigID
2121 #undef GLXFBConfigIDSGIX
2122 #undef GLXPbufferSGIX
2123
2124
2125 /* Opcodes for GLX commands */
2126
2127 #define X_GLXRender                       1
2128 #define X_GLXRenderLarge                  2
2129 #define X_GLXCreateContext                3
2130 #define X_GLXDestroyContext               4
2131 #define X_GLXMakeCurrent                  5
2132 #define X_GLXIsDirect                     6
2133 #define X_GLXQueryVersion                 7
2134 #define X_GLXWaitGL                       8
2135 #define X_GLXWaitX                        9
2136 #define X_GLXCopyContext                 10
2137 #define X_GLXSwapBuffers                 11
2138 #define X_GLXUseXFont                    12
2139 #define X_GLXCreateGLXPixmap             13
2140 #define X_GLXGetVisualConfigs            14
2141 #define X_GLXDestroyGLXPixmap            15
2142 #define X_GLXVendorPrivate               16
2143 #define X_GLXVendorPrivateWithReply      17
2144 #define X_GLXQueryExtensionsString       18
2145 #define X_GLXQueryServerString           19
2146 #define X_GLXClientInfo                  20
2147 #define X_GLXGetFBConfigs                21
2148 #define X_GLXCreatePixmap                22
2149 #define X_GLXDestroyPixmap               23
2150 #define X_GLXCreateNewContext            24
2151 #define X_GLXQueryContext                25
2152 #define X_GLXMakeContextCurrent          26
2153 #define X_GLXCreatePbuffer               27
2154 #define X_GLXDestroyPbuffer              28
2155 #define X_GLXGetDrawableAttributes       29
2156 #define X_GLXChangeDrawableAttributes    30
2157 #define X_GLXCreateWindow                31
2158 #define X_GLXDestroyWindow               32
2159 #define X_GLXSetClientInfoARB            33
2160 #define X_GLXCreateContextAtrribsARB     34
2161 #define X_GLXSetConfigInfo2ARB           35
2162
2163 /* Opcodes for single commands (part of GLX command space) */
2164
2165 #define X_GLsop_NewList                    101
2166 #define X_GLsop_EndList                    102
2167 #define X_GLsop_DeleteLists                103
2168 #define X_GLsop_GenLists                   104
2169 #define X_GLsop_FeedbackBuffer             105
2170 #define X_GLsop_SelectBuffer               106
2171 #define X_GLsop_RenderMode                 107
2172 #define X_GLsop_Finish                     108
2173 #define X_GLsop_Flush                      142
2174 #define X_GLsop_PixelStoref                109
2175 #define X_GLsop_PixelStorei                110
2176 #define X_GLsop_ReadPixels                 111
2177 #define X_GLsop_GetBooleanv                112
2178 #define X_GLsop_GetClipPlane               113
2179 #define X_GLsop_GetDoublev                 114
2180 #define X_GLsop_GetError                   115
2181 #define X_GLsop_GetFloatv                  116
2182 #define X_GLsop_GetIntegerv                117
2183 #define X_GLsop_GetLightfv                 118
2184 #define X_GLsop_GetLightiv                 119
2185 #define X_GLsop_GetMapdv                   120
2186 #define X_GLsop_GetMapfv                   121
2187 #define X_GLsop_GetMapiv                   122
2188 #define X_GLsop_GetMaterialfv              123
2189 #define X_GLsop_GetMaterialiv              124
2190 #define X_GLsop_GetPixelMapfv              125
2191 #define X_GLsop_GetPixelMapuiv             126
2192 #define X_GLsop_GetPixelMapusv             127
2193 #define X_GLsop_GetPolygonStipple          128
2194 #define X_GLsop_GetString                  129
2195 #define X_GLsop_GetTexEnvfv                130
2196 #define X_GLsop_GetTexEnviv                131
2197 #define X_GLsop_GetTexGendv                132
2198 #define X_GLsop_GetTexGenfv                133
2199 #define X_GLsop_GetTexGeniv                134
2200 #define X_GLsop_GetTexImage                135
2201 #define X_GLsop_GetTexParameterfv          136
2202 #define X_GLsop_GetTexParameteriv          137
2203 #define X_GLsop_GetTexLevelParameterfv     138
2204 #define X_GLsop_GetTexLevelParameteriv     139
2205 #define X_GLsop_IsEnabled                  140
2206 #define X_GLsop_IsList                     141
2207 #define X_GLsop_AreTexturesResident        143
2208 #define X_GLsop_DeleteTextures             144
2209 #define X_GLsop_GenTextures                145
2210 #define X_GLsop_IsTexture                  146
2211 #define X_GLsop_GetColorTable              147
2212 #define X_GLsop_GetColorTableParameterfv   148
2213 #define X_GLsop_GetColorTableParameteriv   149
2214 #define X_GLsop_GetConvolutionFilter       150
2215 #define X_GLsop_GetConvolutionParameterfv  151
2216 #define X_GLsop_GetConvolutionParameteriv  152
2217 #define X_GLsop_GetSeparableFilter         153
2218 #define X_GLsop_GetHistogram               154
2219 #define X_GLsop_GetHistogramParameterfv    155
2220 #define X_GLsop_GetHistogramParameteriv    156
2221 #define X_GLsop_GetMinmax                  157
2222 #define X_GLsop_GetMinmaxParameterfv       158
2223 #define X_GLsop_GetMinmaxParameteriv       159
2224 #define X_GLsop_GetCompressedTexImage      160
2225
2226
2227 /* Opcodes for rendering commands */
2228
2229 #define X_GLrop_CallList                     1
2230 #define X_GLrop_CallLists                    2
2231 #define X_GLrop_ListBase                     3
2232 #define X_GLrop_Begin                        4
2233 #define X_GLrop_Bitmap                       5
2234 #define X_GLrop_Color3bv                     6
2235 #define X_GLrop_Color3dv                     7
2236 #define X_GLrop_Color3fv                     8
2237 #define X_GLrop_Color3iv                     9
2238 #define X_GLrop_Color3sv                    10
2239 #define X_GLrop_Color3ubv                   11
2240 #define X_GLrop_Color3uiv                   12
2241 #define X_GLrop_Color3usv                   13
2242 #define X_GLrop_Color4bv                    14
2243 #define X_GLrop_Color4dv                    15
2244 #define X_GLrop_Color4fv                    16
2245 #define X_GLrop_Color4iv                    17
2246 #define X_GLrop_Color4sv                    18
2247 #define X_GLrop_Color4ubv                   19
2248 #define X_GLrop_Color4uiv                   20
2249 #define X_GLrop_Color4usv                   21
2250 #define X_GLrop_EdgeFlagv                   22
2251 #define X_GLrop_End                         23
2252 #define X_GLrop_Indexdv                     24
2253 #define X_GLrop_Indexfv                     25
2254 #define X_GLrop_Indexiv                     26
2255 #define X_GLrop_Indexsv                     27
2256 #define X_GLrop_Normal3bv                   28
2257 #define X_GLrop_Normal3dv                   29
2258 #define X_GLrop_Normal3fv                   30
2259 #define X_GLrop_Normal3iv                   31
2260 #define X_GLrop_Normal3sv                   32
2261 #define X_GLrop_RasterPos2dv                33
2262 #define X_GLrop_RasterPos2fv                34
2263 #define X_GLrop_RasterPos2iv                35
2264 #define X_GLrop_RasterPos2sv                36
2265 #define X_GLrop_RasterPos3dv                37
2266 #define X_GLrop_RasterPos3fv                38
2267 #define X_GLrop_RasterPos3iv                39
2268 #define X_GLrop_RasterPos3sv                40
2269 #define X_GLrop_RasterPos4dv                41
2270 #define X_GLrop_RasterPos4fv                42
2271 #define X_GLrop_RasterPos4iv                43
2272 #define X_GLrop_RasterPos4sv                44
2273 #define X_GLrop_Rectdv                      45
2274 #define X_GLrop_Rectfv                      46
2275 #define X_GLrop_Rectiv                      47
2276 #define X_GLrop_Rectsv                      48
2277 #define X_GLrop_TexCoord1dv                 49
2278 #define X_GLrop_TexCoord1fv                 50
2279 #define X_GLrop_TexCoord1iv                 51
2280 #define X_GLrop_TexCoord1sv                 52
2281 #define X_GLrop_TexCoord2dv                 53
2282 #define X_GLrop_TexCoord2fv                 54
2283 #define X_GLrop_TexCoord2iv                 55
2284 #define X_GLrop_TexCoord2sv                 56
2285 #define X_GLrop_TexCoord3dv                 57
2286 #define X_GLrop_TexCoord3fv                 58
2287 #define X_GLrop_TexCoord3iv                 59
2288 #define X_GLrop_TexCoord3sv                 60
2289 #define X_GLrop_TexCoord4dv                 61
2290 #define X_GLrop_TexCoord4fv                 62
2291 #define X_GLrop_TexCoord4iv                 63
2292 #define X_GLrop_TexCoord4sv                 64
2293 #define X_GLrop_Vertex2dv                   65
2294 #define X_GLrop_Vertex2fv                   66
2295 #define X_GLrop_Vertex2iv                   67
2296 #define X_GLrop_Vertex2sv                   68
2297 #define X_GLrop_Vertex3dv                   69
2298 #define X_GLrop_Vertex3fv                   70
2299 #define X_GLrop_Vertex3iv                   71
2300 #define X_GLrop_Vertex3sv                   72
2301 #define X_GLrop_Vertex4dv                   73
2302 #define X_GLrop_Vertex4fv                   74
2303 #define X_GLrop_Vertex4iv                   75
2304 #define X_GLrop_Vertex4sv                   76
2305 #define X_GLrop_ClipPlane                   77
2306 #define X_GLrop_ColorMaterial               78
2307 #define X_GLrop_CullFace                    79
2308 #define X_GLrop_Fogf                        80
2309 #define X_GLrop_Fogfv                       81
2310 #define X_GLrop_Fogi                        82
2311 #define X_GLrop_Fogiv                       83
2312 #define X_GLrop_FrontFace                   84
2313 #define X_GLrop_Hint                        85
2314 #define X_GLrop_Lightf                      86
2315 #define X_GLrop_Lightfv                     87
2316 #define X_GLrop_Lighti                      88
2317 #define X_GLrop_Lightiv                     89
2318 #define X_GLrop_LightModelf                 90
2319 #define X_GLrop_LightModelfv                91
2320 #define X_GLrop_LightModeli                 92
2321 #define X_GLrop_LightModeliv                93
2322 #define X_GLrop_LineStipple                 94
2323 #define X_GLrop_LineWidth                   95
2324 #define X_GLrop_Materialf                   96
2325 #define X_GLrop_Materialfv                  97
2326 #define X_GLrop_Materiali                   98
2327 #define X_GLrop_Materialiv                  99
2328 #define X_GLrop_PointSize                  100
2329 #define X_GLrop_PolygonMode                101
2330 #define X_GLrop_PolygonStipple             102
2331 #define X_GLrop_Scissor                    103
2332 #define X_GLrop_ShadeModel                 104
2333 #define X_GLrop_TexParameterf              105
2334 #define X_GLrop_TexParameterfv             106
2335 #define X_GLrop_TexParameteri              107
2336 #define X_GLrop_TexParameteriv             108
2337 #define X_GLrop_TexImage1D                 109
2338 #define X_GLrop_TexImage2D                 110
2339 #define X_GLrop_TexEnvf                    111
2340 #define X_GLrop_TexEnvfv                   112
2341 #define X_GLrop_TexEnvi                    113
2342 #define X_GLrop_TexEnviv                   114
2343 #define X_GLrop_TexGend                    115
2344 #define X_GLrop_TexGendv                   116
2345 #define X_GLrop_TexGenf                    117
2346 #define X_GLrop_TexGenfv                   118
2347 #define X_GLrop_TexGeni                    119
2348 #define X_GLrop_TexGeniv                   120
2349 #define X_GLrop_InitNames                  121
2350 #define X_GLrop_LoadName                   122
2351 #define X_GLrop_PassThrough                123
2352 #define X_GLrop_PopName                    124
2353 #define X_GLrop_PushName                   125
2354 #define X_GLrop_DrawBuffer                 126
2355 #define X_GLrop_Clear                      127
2356 #define X_GLrop_ClearAccum                 128
2357 #define X_GLrop_ClearIndex                 129
2358 #define X_GLrop_ClearColor                 130
2359 #define X_GLrop_ClearStencil               131
2360 #define X_GLrop_ClearDepth                 132
2361 #define X_GLrop_StencilMask                133
2362 #define X_GLrop_ColorMask                  134
2363 #define X_GLrop_DepthMask                  135
2364 #define X_GLrop_IndexMask                  136
2365 #define X_GLrop_Accum                      137
2366 #define X_GLrop_Disable                    138
2367 #define X_GLrop_Enable                     139
2368 #define X_GLrop_PopAttrib                  141
2369 #define X_GLrop_PushAttrib                 142
2370 #define X_GLrop_Map1d                      143
2371 #define X_GLrop_Map1f                      144
2372 #define X_GLrop_Map2d                      145
2373 #define X_GLrop_Map2f                      146
2374 #define X_GLrop_MapGrid1d                  147
2375 #define X_GLrop_MapGrid1f                  148
2376 #define X_GLrop_MapGrid2d                  149
2377 #define X_GLrop_MapGrid2f                  150
2378 #define X_GLrop_EvalCoord1dv               151
2379 #define X_GLrop_EvalCoord1fv               152
2380 #define X_GLrop_EvalCoord2dv               153
2381 #define X_GLrop_EvalCoord2fv               154
2382 #define X_GLrop_EvalMesh1                  155
2383 #define X_GLrop_EvalPoint1                 156
2384 #define X_GLrop_EvalMesh2                  157
2385 #define X_GLrop_EvalPoint2                 158
2386 #define X_GLrop_AlphaFunc                  159
2387 #define X_GLrop_BlendFunc                  160
2388 #define X_GLrop_LogicOp                    161
2389 #define X_GLrop_StencilFunc                162
2390 #define X_GLrop_StencilOp                  163
2391 #define X_GLrop_DepthFunc                  164
2392 #define X_GLrop_PixelZoom                  165
2393 #define X_GLrop_PixelTransferf             166
2394 #define X_GLrop_PixelTransferi             167
2395 #define X_GLrop_PixelMapfv                 168
2396 #define X_GLrop_PixelMapuiv                169
2397 #define X_GLrop_PixelMapusv                170
2398 #define X_GLrop_ReadBuffer                 171
2399 #define X_GLrop_CopyPixels                 172
2400 #define X_GLrop_DrawPixels                 173
2401 #define X_GLrop_DepthRange                 174
2402 #define X_GLrop_Frustum                    175
2403 #define X_GLrop_LoadIdentity               176
2404 #define X_GLrop_LoadMatrixf                177
2405 #define X_GLrop_LoadMatrixd                178
2406 #define X_GLrop_MatrixMode                 179
2407 #define X_GLrop_MultMatrixf                180
2408 #define X_GLrop_MultMatrixd                181
2409 #define X_GLrop_Ortho                      182
2410 #define X_GLrop_PopMatrix                  183
2411 #define X_GLrop_PushMatrix                 184
2412 #define X_GLrop_Rotated                    185
2413 #define X_GLrop_Rotatef                    186
2414 #define X_GLrop_Scaled                     187
2415 #define X_GLrop_Scalef                     188
2416 #define X_GLrop_Translated                 189
2417 #define X_GLrop_Translatef                 190
2418 #define X_GLrop_Viewport                   191
2419 #define X_GLrop_DrawArrays                 193
2420 #define X_GLrop_PolygonOffset              192
2421 #define X_GLrop_CopyTexImage1D             4119
2422 #define X_GLrop_CopyTexImage2D             4120
2423 #define X_GLrop_CopyTexSubImage1D          4121
2424 #define X_GLrop_CopyTexSubImage2D          4122
2425 #define X_GLrop_TexSubImage1D              4099
2426 #define X_GLrop_TexSubImage2D              4100
2427 #define X_GLrop_BindTexture                4117
2428 #define X_GLrop_PrioritizeTextures         4118
2429 #define X_GLrop_Indexubv                   194
2430 #define X_GLrop_BlendColor                 4096
2431 #define X_GLrop_BlendEquation              4097
2432 #define X_GLrop_ColorTable                 2053
2433 #define X_GLrop_ColorTableParameterfv      2054
2434 #define X_GLrop_ColorTableParameteriv      2055
2435 #define X_GLrop_CopyColorTable             2056
2436 #define X_GLrop_ColorSubTable              195
2437 #define X_GLrop_CopyColorSubTable          196
2438 #define X_GLrop_ConvolutionFilter1D        4101
2439 #define X_GLrop_ConvolutionFilter2D        4102
2440 #define X_GLrop_ConvolutionParameterf      4103
2441 #define X_GLrop_ConvolutionParameterfv     4104
2442 #define X_GLrop_ConvolutionParameteri      4105
2443 #define X_GLrop_ConvolutionParameteriv     4106
2444 #define X_GLrop_CopyConvolutionFilter1D    4107
2445 #define X_GLrop_CopyConvolutionFilter2D    4108
2446 #define X_GLrop_SeparableFilter2D          4109
2447 #define X_GLrop_Histogram                  4110
2448 #define X_GLrop_Minmax                     4111
2449 #define X_GLrop_ResetHistogram             4112
2450 #define X_GLrop_ResetMinmax                4113
2451 #define X_GLrop_TexImage3D                 4114
2452 #define X_GLrop_TexSubImage3D              4115
2453 #define X_GLrop_CopyTexSubImage3D          4123
2454 #define X_GLrop_DrawArraysEXT              4116
2455
2456 /* Added for core GL version 1.3 */
2457
2458 #define X_GLrop_ActiveTextureARB            197
2459 #define X_GLrop_MultiTexCoord1dvARB         198
2460 #define X_GLrop_MultiTexCoord1fvARB         199
2461 #define X_GLrop_MultiTexCoord1ivARB         200
2462 #define X_GLrop_MultiTexCoord1svARB         201
2463 #define X_GLrop_MultiTexCoord2dvARB         202
2464 #define X_GLrop_MultiTexCoord2fvARB         203
2465 #define X_GLrop_MultiTexCoord2ivARB         204
2466 #define X_GLrop_MultiTexCoord2svARB         205
2467 #define X_GLrop_MultiTexCoord3dvARB         206
2468 #define X_GLrop_MultiTexCoord3fvARB         207
2469 #define X_GLrop_MultiTexCoord3ivARB         208
2470 #define X_GLrop_MultiTexCoord3svARB         209
2471 #define X_GLrop_MultiTexCoord4dvARB         210
2472 #define X_GLrop_MultiTexCoord4fvARB         211
2473 #define X_GLrop_MultiTexCoord4ivARB         212
2474 #define X_GLrop_MultiTexCoord4svARB         213
2475 #define X_GLrop_CompressedTexImage1D        214
2476 #define X_GLrop_CompressedTexImage2D        215
2477 #define X_GLrop_CompressedTexImage3D        216
2478 #define X_GLrop_CompressedTexSubImage1D     217
2479 #define X_GLrop_CompressedTexSubImage2D     218
2480 #define X_GLrop_CompressedTexSubImage3D     219
2481 #define X_GLrop_SampleCoverageARB           229
2482
2483 /* Added for core GL version 1.4 */
2484
2485 #define X_GLrop_WindowPos3fARB              230
2486 #define X_GLrop_FogCoordfv                  4124
2487 #define X_GLrop_FogCoorddv                  4125
2488 #define X_GLrop_PointParameterfARB          2065
2489 #define X_GLrop_PointParameterfvARB         2066
2490 #define X_GLrop_SecondaryColor3bv           4126
2491 #define X_GLrop_SecondaryColor3sv           4127
2492 #define X_GLrop_SecondaryColor3iv           4128
2493 #define X_GLrop_SecondaryColor3fv           4129
2494 #define X_GLrop_SecondaryColor3dv           4130
2495 #define X_GLrop_SecondaryColor3ubv          4131
2496 #define X_GLrop_SecondaryColor3usv          4132
2497 #define X_GLrop_SecondaryColor3uiv          4133
2498 #define X_GLrop_BlendFuncSeparate           4134
2499 #define X_GLrop_PointParameteri             4221
2500 #define X_GLrop_PointParameteriv            4222
2501
2502 /* Added for core GL version 1.5 */
2503 /* XXX opcodes not defined in the spec */
2504
2505 /* Opcodes for Vendor Private commands */
2506
2507
2508 #define X_GLvop_GetConvolutionFilterEXT        1
2509 #define X_GLvop_GetConvolutionParameterfvEXT   2
2510 #define X_GLvop_GetConvolutionParameterivEXT   3
2511 #define X_GLvop_GetSeparableFilterEXT          4
2512 #define X_GLvop_GetHistogramEXT                5
2513 #define X_GLvop_GetHistogramParameterfvEXT     6
2514 #define X_GLvop_GetHistogramParameterivEXT     7
2515 #define X_GLvop_GetMinmaxEXT                   8
2516 #define X_GLvop_GetMinmaxParameterfvEXT        9
2517 #define X_GLvop_GetMinmaxParameterivEXT        10
2518 #define X_GLvop_AreTexturesResidentEXT         11
2519 #define X_GLvop_DeleteTexturesEXT              12
2520 #define X_GLvop_GenTexturesEXT                 13
2521 #define X_GLvop_IsTextureEXT                   14
2522 #define X_GLvop_GetCombinerInputParameterfvNV  1270
2523 #define X_GLvop_GetCombinerInputParameterivNV  1271
2524 #define X_GLvop_GetCombinerOutputParameterfvNV 1272
2525 #define X_GLvop_GetCombinerOutputParameterivNV 1273
2526 #define X_GLvop_GetFinalCombinerOutputParameterfvNV 1274
2527 #define X_GLvop_GetFinalCombinerOutputParameterivNV 1275
2528 #define X_GLvop_DeleteFenceNV                  1276
2529 #define X_GLvop_GenFencesNV                    1277
2530 #define X_GLvop_IsFenceNV                      1278
2531 #define X_GLvop_TestFenceNV                    1279
2532 #define X_GLvop_GetFenceivNV                   1280
2533 #define X_GLvop_AreProgramsResidentNV          1293
2534 #define X_GLvop_DeleteProgramARB               1294
2535 #define X_GLvop_GenProgramsARB                 1295
2536 #define X_GLvop_GetProgramEnvParameterfvARB    1296
2537 #define X_GLvop_GetProgramEnvParameterdvARB    1297
2538 #define X_GLvop_GetProgramEnvParameterivNV     1298
2539 #define X_GLvop_GetProgramStringNV             1299
2540 #define X_GLvop_GetTrackMatrixivNV             1300
2541 #define X_GLvop_GetVertexAttribdvARB           1301
2542 #define X_GLvop_GetVertexAttribfvARB           1302
2543 #define X_GLvop_GetVertexAttribivARB           1303
2544 #define X_GLvop_IsProgramARB                   1304
2545 #define X_GLvop_GetProgramLocalParameterfvARB  1305
2546 #define X_GLvop_GetProgramLocalParameterdvARB  1306
2547 #define X_GLvop_GetProgramivARB                1307
2548 #define X_GLvop_GetProgramStringARB            1308
2549 #define X_GLvop_GetProgramNamedParameter4fvNV  1310
2550 #define X_GLvop_GetProgramNamedParameter4dvNV  1311
2551 #define X_GLvop_SampleMaskSGIS                 2048
2552 #define X_GLvop_SamplePatternSGIS              2049
2553 #define X_GLvop_GetDetailTexFuncSGIS           4096
2554 #define X_GLvop_GetSharpenTexFuncSGIS          4097
2555 #define X_GLvop_GetColorTableSGI               4098
2556 #define X_GLvop_GetColorTableParameterfvSGI    4099
2557 #define X_GLvop_GetColorTableParameterivSGI    4100
2558 #define X_GLvop_GetTexFilterFuncSGIS           4101
2559 #define X_GLvop_GetInstrumentsSGIX             4102
2560 #define X_GLvop_InstrumentsBufferSGIX          4103
2561 #define X_GLvop_PollInstrumentsSGIX            4104
2562 #define X_GLvop_FlushRasterSGIX                4105
2563
2564 /* Opcodes for GLX vendor private commands */
2565
2566 #define X_GLXvop_QueryContextInfoEXT            1024
2567 #define X_GLXvop_BindTexImageEXT                1330
2568 #define X_GLXvop_ReleaseTexImageEXT             1331
2569 #define X_GLXvop_SwapIntervalSGI                65536
2570 #define X_GLXvop_MakeCurrentReadSGI             65537
2571 #define X_GLXvop_CreateGLXVideoSourceSGIX       65538
2572 #define X_GLXvop_DestroyGLXVideoSourceSGIX      65539
2573 #define X_GLXvop_GetFBConfigsSGIX               65540
2574 #define X_GLXvop_CreateContextWithConfigSGIX    65541
2575 #define X_GLXvop_CreateGLXPixmapWithConfigSGIX  65542
2576 #define X_GLXvop_CreateGLXPbufferSGIX           65543
2577 #define X_GLXvop_DestroyGLXPbufferSGIX          65544
2578 #define X_GLXvop_ChangeDrawableAttributesSGIX   65545
2579 #define X_GLXvop_GetDrawableAttributesSGIX      65546
2580 #define X_GLXvop_JoinSwapGroupSGIX              65547
2581 #define X_GLXvop_BindSwapBarrierSGIX            65548
2582 #define X_GLXvop_QueryMaxSwapBarriersSGIX       65549
2583 #define X_GLXvop_QueryHyperpipeNetworkSGIX      65550
2584 #define X_GLXvop_QueryHyperpipeConfigSGIX       65551
2585 #define X_GLXvop_HyperpipeConfigSGIX            65552
2586 #define X_GLXvop_DestroyHyperpipeConfigSGIX     65553
2587
2588 /* ARB extension opcodes */
2589
2590 /*  1. GL_ARB_multitexture - see GL 1.2 opcodes */
2591 /*  5. GL_ARB_multisample - see GL 1.3 opcodes */
2592 /* 12. GL_ARB_texture_compression - see GL 1.3 opcodes */
2593 /* 14. GL_ARB_point_parameters - see GL 1.4 opcodees */
2594
2595 /* 15. GL_ARB_vertex_blend */
2596 #define X_GLrop_WeightbvARB                  220
2597 #define X_GLrop_WeightubvARB                 221
2598 #define X_GLrop_WeightsvARB                  222
2599 #define X_GLrop_WeightusvARB                 223
2600 #define X_GLrop_WeightivARB                  224
2601 #define X_GLrop_WeightuivARB                 225
2602 #define X_GLrop_VertexBlendARB               226
2603 #define X_GLrop_WeightfvARB                  227
2604 #define X_GLrop_WeightdvARB                  228
2605
2606 /* 16. GL_ARB_matrix_palette */
2607 /* XXX opcodes not defined in the spec */
2608
2609 /* 25. GL_ARB_window_pos - see GL 1.4 opcodes */
2610
2611 /* 26. GL_ARB_vertex_program */
2612 #define X_GLrop_BindProgramARB              4180
2613 #define X_GLrop_ProgramEnvParameter4fvARB   4184
2614 #define X_GLrop_ProgramEnvParameter4dvARB   4185
2615 #define X_GLrop_VertexAttrib1svARB          4189
2616 #define X_GLrop_VertexAttrib2svARB          4190
2617 #define X_GLrop_VertexAttrib3svARB          4191
2618 #define X_GLrop_VertexAttrib4svARB          4192
2619 #define X_GLrop_VertexAttrib1fvARB          4193
2620 #define X_GLrop_VertexAttrib2fvARB          4194
2621 #define X_GLrop_VertexAttrib3fvARB          4195
2622 #define X_GLrop_VertexAttrib4fvARB          4196
2623 #define X_GLrop_VertexAttrib1dvARB          4197
2624 #define X_GLrop_VertexAttrib2dvARB          4198
2625 #define X_GLrop_VertexAttrib3dvARB          4199
2626 #define X_GLrop_ProgramLocalParameter4fvARB 4215
2627 #define X_GLrop_ProgramLocalParameter4dvARB 4216
2628 #define X_GLrop_ProgramStringARB            4217
2629 #define X_GLrop_VertexAttrib4dvARB          4200
2630 #define X_GLrop_VertexAttrib4NubvARB        4201
2631 #define X_GLrop_VertexAttrib4bvARB          4230
2632 #define X_GLrop_VertexAttrib4ivARB          4231
2633 #define X_GLrop_VertexAttrib4ubvARB         4232
2634 #define X_GLrop_VertexAttrib4usvARB         4233
2635 #define X_GLrop_VertexAttrib4uivARB         4234
2636 #define X_GLrop_VertexAttrib4NbvARB         4235
2637 #define X_GLrop_VertexAttrib4NsvARB         4236
2638 #define X_GLrop_VertexAttrib4NivARB         4237
2639 #define X_GLrop_VertexAttrib4NusvARB        4238
2640 #define X_GLrop_VertexAttrib4NuivARB        4239
2641
2642 /* 27. GL_ARB_fragment_program - see GL_ARB_vertex_program opcodes */
2643
2644 /* 29. GL_ARB_occlusion_query */
2645 /* XXX opcodes not defined in the spec */
2646
2647
2648 /* New extension opcodes */
2649
2650 /* 145. GL_EXT_secondary_color - see GL 1.4 opcodes */
2651
2652 /* 188. GL_EXT_vertex_weighting */
2653 #define X_GLrop_VertexWeightfvEXT           4135
2654
2655 /* 191. GL_NV_register_combiners */
2656 #define X_GLrop_CombinerParameterfNV        4136
2657 #define X_GLrop_CombinerParameterfvNV       4137
2658 #define X_GLrop_CombinerParameteriNV        4138
2659 #define X_GLrop_CombinerParameterivNV       4139
2660 #define X_GLrop_CombinerInputNV             4140
2661 #define X_GLrop_CombinerOutputNV            4141
2662 #define X_GLrop_FinalCombinerInputNV        4142
2663
2664 /* 222. GL_NV_fence */
2665 #define X_GLrop_SetFenceNV                  4143
2666 #define X_GLrop_FinishFenceNV               4144
2667
2668 /* 227. GL_NV_register_combiners2 */
2669 /* XXX opcodes not defined in the spec */
2670
2671 /* 233. GL_NV_vertex_program - see also GL_ARB_vertex_program opcodes */
2672 #define X_GLrop_ExecuteProgramNV            4181
2673 #define X_GLrop_RequestResidentProgramsNV   4182
2674 #define X_GLrop_LoadProgamNV                4183
2675 #define X_GLrop_ProgramParameters4fvNV      4186
2676 #define X_GLrop_ProgramParameters4dvNV      4187
2677 #define X_GLrop_TrackMatrixNV               4188
2678 #define X_GLrop_VertexAttribs1svNV          4202
2679 #define X_GLrop_VertexAttribs2svNV          4203
2680 #define X_GLrop_VertexAttribs3svNV          4204
2681 #define X_GLrop_VertexAttribs4svNV          4205
2682 #define X_GLrop_VertexAttribs1fvNV          4206
2683 #define X_GLrop_VertexAttribs2fvNV          4207
2684 #define X_GLrop_VertexAttribs3fvNV          4208
2685 #define X_GLrop_VertexAttribs4fvNV          4209
2686 #define X_GLrop_VertexAttribs1dvNV          4210
2687 #define X_GLrop_VertexAttribs2dvNV          4211
2688 #define X_GLrop_VertexAttribs3dvNV          4212
2689 #define X_GLrop_VertexAttribs4dvNV          4213
2690 #define X_GLrop_VertexAttribs4ubvNV         4214
2691
2692 /* 261. GL_NV_occlusion_query */
2693 /* XXX opcodes not defined in the spec */
2694
2695 /* 262. GL_NV_point_sprite - see GL 1.4 opcodes */
2696
2697 /* 268. GL_EXT_stencil_two_side */
2698 #define X_GLrop_ActiveStencilFaceEXT        4220
2699
2700 /* 282. GL_NV_fragment_program - see also GL_NV_vertex_program and GL_ARB_vertex_program opcodes */
2701 #define X_GLrop_ProgramNamedParameter4fvNV  4218
2702 #define X_GLrop_ProgramNamedParameter4dvNV  4219
2703
2704 /* 285. GL_NV_primitive_restart */
2705 /* XXX opcodes not defined in the spec */
2706
2707 /* 297. GL_EXT_depth_bounds_test */
2708 #define X_GLrop_DepthBoundsEXT              4229
2709
2710 /* 299. GL_EXT_blend_equation_separate */
2711 #define X_GLrop_BlendEquationSeparateEXT    4228
2712
2713 /* 310. GL_EXT_framebuffer_object */
2714 #define X_GLvop_IsRenderbufferEXT                      1422
2715 #define X_GLvop_GenRenderbuffersEXT                    1423
2716 #define X_GLvop_GetRenderbufferParameterivEXT          1424
2717 #define X_GLvop_IsFramebufferEXT                       1425
2718 #define X_GLvop_GenFramebuffersEXT                     1426
2719 #define X_GLvop_CheckFramebufferStatusEXT              1427
2720 #define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428
2721
2722 #endif /* _GLX_glxproto_h_ */