# This file is part of "xtrace"
# Copyright (C) 2008,2009 RALOVICH, Kristóf
# modifications/reformating Copyright (C) 2009 Bernhard R. Link
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

EXTENSION "GLX" glx
USE core

REQUESTS
UNKNOWN
glXRender
glXRenderLarge
glXCreateContext
glXDestroyContext
glXMakeCurrent RESPONDS
glXIsDirect RESPONDS
glXQueryVersion RESPONDS
glXWaitGL
glXWaitX
glXCopyContext /* 10 */
glXSwapBuffers
glXUseXFont
glXCreateGLXPixmap
glXGetVisualConfigs RESPONDS
glXDestroyGLXPixmap
glXVendorPrivate
glXVendorPrivateWithReply RESPONDS
glXQueryExtensionsString RESPONDS UNSUPPORTED
glXQueryServerString RESPONDS
glXClientInfo /* 20 */
glXGetFBConfigs RESPONDS UNSUPPORTED
glXCreatePixmap
glXDestroyPixmap
glXCreateNewContext
glXQueryContext RESPONDS UNSUPPORTED
glXMakeContextCurrent RESPONDS
glXCreatePbuffer
glXDestroyPbuffer
glXGetDrawableAttributes RESPONDS UNSUPPORTED
glXChangeDrawableAttributes UNSUPPORTED /* 30 */
glXCreateWindow
glXDestroyWindow
glXSetClientInfoARB UNSUPPORTED
glXCreateContextAttribsARB UNSUPPORTED
glXSetClientInfo2ARB UNSUPPORTED
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN /* 40 */
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN /* 50 */
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN /* 60 */
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN /* 70 */
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN /* 80 */
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN /* 90 */
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN
UNKNOWN /* 100 */
glNewList
glEndList
glDeleteLists
glGenLists RESPONDS
glFeedbackBuffer UNSUPPORTED
glSelectBuffer UNSUPPORTED
glRenderMode RESPONDS UNSUPPORTED
glFinish RESPONDS UNSUPPORTED
glPixelStoref UNSUPPORTED
glPixelStorei UNSUPPORTED /* 110 */
glReadPixels RESPONDS UNSUPPORTED
glGetBooleanv RESPONDS UNSUPPORTED
glGetClipPlane RESPONDS UNSUPPORTED
glGetDoublev RESPONDS UNSUPPORTED
glGetError RESPONDS
glXGetFloatv RESPONDS UNSUPPORTED
glGetIntegerv RESPONDS
glGetLightfv RESPONDS UNSUPPORTED
glGetLightiv RESPONDS UNSUPPORTED
glGetMapdv RESPONDS UNSUPPORTED /* 120 */
glGetMapfv RESPONDS UNSUPPORTED
glGetMapiv RESPONDS UNSUPPORTED
glGetMaterialfv RESPONDS UNSUPPORTED
glGetMaterialiv RESPONDS UNSUPPORTED
glGetPixelMapfv RESPONDS UNSUPPORTED
glGetPixelMapuiv RESPONDS UNSUPPORTED
glGetPixelMapusv RESPONDS UNSUPPORTED
glGetPolygonStipple RESPONDS UNSUPPORTED
glGetString RESPONDS
glGetTexEnvfv RESPONDS UNSUPPORTED /* 130 */
glGetTexEnviv RESPONDS UNSUPPORTED
glGetTexGendv RESPONDS UNSUPPORTED
glGetTexGenfv RESPONDS UNSUPPORTED
glGetTexGeniv RESPONDS UNSUPPORTED
glGetTexImage RESPONDS UNSUPPORTED
glGetTexParameterfv RESPONDS UNSUPPORTED
glGetTexParameteriv RESPONDS UNSUPPORTED
glGetTexLevelParameterfv RESPONDS UNSUPPORTED
glGetTexLevelParameteriv RESPONDS UNSUPPORTED
glIsEnabled RESPONDS UNSUPPORTED /* 140 */
glIsList RESPONDS UNSUPPORTED
glFlush
glAreTexturesResident RESPONDS UNSUPPORTED
glDeleteTextures UNSUPPORTED
glGenTextures RESPONDS UNSUPPORTED
glIsTexture RESPONDS UNSUPPORTED
glGetColorTable RESPONDS UNSUPPORTED
glGetColorTableParameterfv RESPONDS UNSUPPORTED
glGetColorTableParameteriv RESPONDS UNSUPPORTED
glGetConvolutionFilter RESPONDS UNSUPPORTED /* 150 */
glGetConvolutionParameterfv RESPONDS UNSUPPORTED
glGetConvolutionParameteriv RESPONDS UNSUPPORTED
glGetSeparableFilter RESPONDS UNSUPPORTED
glGetHistogram RESPONDS UNSUPPORTED
glGetHistogramParameterfv RESPONDS UNSUPPORTED
glGetHistogramParameteriv RESPONDS UNSUPPORTED
glGetMinmax RESPONDS UNSUPPORTED
glGetMinmaxParameterfv RESPONDS UNSUPPORTED
glGetMinmaxParameteriv RESPONDS UNSUPPORTED
glGetCompressedTexImage RESPONDS UNSUPPORTED /* 160 */
glDeleteQueries UNSUPPORTED
glGenQueries RESPONDS UNSUPPORTED
glIsQuery RESPONDS UNSUPPORTED
glGetQueryiv RESPONDS UNSUPPORTED
glGetQueryObjectiv RESPONDS UNSUPPORTED
glGetQueryObjectuiv RESPONDS UNSUPPORTED
END

EVENTS
PbufferClobber
END

ERRORS
GLXBadContext
GLXBadContextState
GLXBadDrawable
GLXBadPixmap
GLXBadContextTag
GLXBadCurrentWindow
GLXBadRenderRequest
GLXBadLargeRequest
GLXUnsupportedPrivateRequest
GLXBadFBConfig
GLXBadPbuffer
GLXBadCurrentDrawable
GLXBadWindow
END

CONSTANTS gl_command
1	CallList
2	CallLists
3	ListBase
4	Begin
5	Bitmap
6	Color3bv
7	Color3dv
8	Color3fv
9	Color3iv
10	Color3sv
11	Color3ubv
12	Color3uiv
13	Color3usv
14	Color4bv
15	Color4dv
16	Color4fv
17	Color4iv
18	Color4sv
19	Color4ubv
20	Color4uiv
21	Color4usv
22	EdgeFlagv
23	End
24	Indexdv
25	Indexfv
26	Indexiv
27	Indexsv
28	Normal3bv
29	Normal3dv
30	Normal3fv
31	Normal3iv
32	Normal3sv
33	RasterPos2dv
34	RasterPos2fv
35	RasterPos2iv
36	RasterPos2sv
37	RasterPos3dv
38	RasterPos3fv
39	RasterPos3iv
40	RasterPos3sv
41	RasterPos4dv
42	RasterPos4fv
43	RasterPos4iv
44	RasterPos4sv
45	Rectdv
46	Rectfv
47	Rectiv
48	Rectsv
49	TexCoord1dv
50	TexCoord1fv
51	TexCoord1iv
52	TexCoord1sv
53	TexCoord2dv
54	TexCoord2fv
55	TexCoord2iv
56	TexCoord2sv
57	TexCoord3dv
58	TexCoord3fv
59	TexCoord3iv
60	TexCoord3sv
61	TexCoord4dv
62	TexCoord4fv
63	TexCoord4iv
64	TexCoord4sv
65	Vertex2dv
66	Vertex2fv
67	Vertex2iv
68	Vertex2sv
69	Vertex3dv
70	Vertex3fv
71	Vertex3iv
72	Vertex3sv
73	Vertex4dv
74	Vertex4fv
75	Vertex4iv
76	Vertex4sv
77	ClipPlane
78	ColorMaterial
79	CullFace
80	Fogf
81	Fogfv
82	Fogi
83	Fogiv
84	FrontFace
85	Hint
86	Lightf
87	Lightfv
88	Lighti
89	Lightiv
90	LightModelf
91	LightModelfv
92	LightModeli
93	LightModeliv
94	LineStipple
95	LineWidth
96	Materialf
97	Materialfv
98	Materiali
99	Materialiv
100	PointSize
101	PolygonMode
102	PolygonStipple
103	Scissor
104	ShadeModel
105	TexParameterf
106	TexParameterfv
107	TexParameteri
108	TexParameteriv
109	TexImage1D
110	TexImage2D
111	TexEnvf
112	TexEnvfv
113	TexEnvi
114	TexEnviv
115	TexGend
116	TexGendv
117	TexGenf
118	TexGenfv
119	TexGeni
120	TexGeniv
121	InitNames
122	LoadName
123	PassThrough
124	PopName
125	PushName
126	DrawBuffer
127	Clear
128	ClearAccum
129	ClearIndex
130	ClearColor
131	ClearStencil
132	ClearDepth
133	StencilMask
134	ColorMask
135	DepthMask
136	IndexMask
137	Accum
141	PopAttrib
142	PushAttrib
147	MapGrid1d
148	MapGrid1f
149	MapGrid2d
150	MapGrid2f
151	EvalCoord1dv
152	EvalCoord1fv
153	EvalCoord2dv
154	EvalCoord2fv
155	EvalMesh1
156	EvalPoint1
157	EvalMesh2
158	EvalPoint2
159	AlphaFunc
160	BlendFunc
161	LogicOp
162	StencilFunc
163	StencilOp
164	DepthFunc
165	PixelZoom
166	PixelTransferf
167	PixelTransferi
168	PixelMapfv
169	PixelMapuiv
170	PixelMapusv
171	ReadBuffer
172	CopyPixels
173	DrawPixels
174	DepthRange
175	Frustum
176	LoadIdentity
177	LoadMatrixf
178	LoadMatrixd
179	MatrixMode
180	MultMatrixf
181	MultMatrixd
182	Ortho
183	PopMatrix
184	PushMatrix
185	Rotated
186	Rotatef
187	Scaled
188	Scalef
189	Translated
190	Translatef
191	Viewport
192	PolygonOffset
194	Indexubv
195	ColorSubTable
196	CopyColorSubTable
197	ActiveTextureARB
198	MultiTexCoord1dvARB
199	MultiTexCoord1fvARB
200	MultiTexCoord1ivARB
201	MultiTexCoord1svARB
202	MultiTexCoord2dvARB
203	MultiTexCoord2fvARB
204	MultiTexCoord2ivARB
205	MultiTexCoord2svARB
206	MultiTexCoord3dvARB
207	MultiTexCoord3fvARB
208	MultiTexCoord3ivARB
209	MultiTexCoord3svARB
210	MultiTexCoord4dvARB
211	MultiTexCoord4fvARB
212	MultiTexCoord4ivARB
213	MultiTexCoord4svARB
229	SampleCoverageARB
230	WindowPos3fvMESA
231	BeginQueryARB
232	EndQueryARB
233	DrawBuffersARB
2048	SampleMaskSGIS
2049	SamplePatternSGIS
2053	ColorTable
2054	ColorTableParameterfv
2055	ColorTableParameteriv
2056	CopyColorTable
2065	PointParameterfEXT
2066	PointParameterfvEXT
4096	BlendColor
4097	BlendEquation
4099	TexSubImage1D
4100	TexSubImage2D
4101	ConvolutionFilter1D
4102	ConvolutionFilter2D
4103	ConvolutionParameterf
4104	ConvolutionParameterfv
4105	ConvolutionParameteri
4106	ConvolutionParameteriv
4107	CopyConvolutionFilter1D
4108	CopyConvolutionFilter2D
4110	Histogram
4111	Minmax
4112	ResetHistogram
4113	ResetMinmax
4114	TexImage3D
4115	TexSubImage3D
4117	BindTexture
4118	PrioritizeTextures
4119	CopyTexImage1D
4120	CopyTexImage2D
4121	CopyTexSubImage1D
4122	CopyTexSubImage2D
4123	CopyTexSubImage3D
4124	FogCoordfvEXT
4125	FogCoorddvEXT
4126	SecondaryColor3bvEXT
4127	SecondaryColor3svEXT
4128	SecondaryColor3ivEXT
4129	SecondaryColor3fvEXT
4130	SecondaryColor3dvEXT
4131	SecondaryColor3ubvEXT
4132	SecondaryColor3usvEXT
4133	SecondaryColor3uivEXT
4134	BlendFuncSeparateEXT
4180	BindProgramNV
4181	ExecuteProgramNV
4182	RequestResidentProgramsNV
4183	LoadProgramNV
4184	ProgramEnvParameter4fvARB
4185	ProgramEnvParameter4dvARB
4186	ProgramParameters4fvNV
4187	ProgramParameters4dvNV
4188	TrackMatrixNV
4189	VertexAttrib1svARB
4190	VertexAttrib2svARB
4191	VertexAttrib3svARB
4192	VertexAttrib4svARB
4193	VertexAttrib1fvARB
4194	VertexAttrib2fvARB
4195	VertexAttrib3fvARB
4196	VertexAttrib4fvARB
4197	VertexAttrib1dvARB
4198	VertexAttrib2dvARB
4199	VertexAttrib3dvARB
4200	VertexAttrib4dvARB
4201	VertexAttrib4NubvARB
4202	VertexAttribs1svNV
4203	VertexAttribs2svNV
4204	VertexAttribs3svNV
4205	VertexAttribs4svNV
4206	VertexAttribs1fvNV
4207	VertexAttribs2fvNV
4208	VertexAttribs3fvNV
4209	VertexAttribs4fvNV
4210	VertexAttribs1dvNV
4211	VertexAttribs2dvNV
4212	VertexAttribs3dvNV
4213	VertexAttribs4dvNV
4214	VertexAttribs4ubvNV
4215	ProgramLocalParameter4fvARB
4216	ProgramLocalParameter4dvARB
4217	ProgramStringARB
4218	ProgramNamedParameter4fvNV
4219	ProgramNamedParameter4dvNV
4220	ActiveStencilFaceEXT
4221	PointParameteriNV
4222	PointParameterivNV
4228	BlendEquationSeparateEXT
4230	VertexAttrib4bvARB
4231	VertexAttrib4ivARB
4232	VertexAttrib4ubvARB
4233	VertexAttrib4usvARB
4234	VertexAttrib4uivARB
4235	VertexAttrib4NbvARB
4236	VertexAttrib4NsvARB
4237	VertexAttrib4NivARB
4238	VertexAttrib4NusvARB
4239	VertexAttrib4NuivARB
4265	VertexAttrib1svNV
4266	VertexAttrib2svNV
4267	VertexAttrib3svNV
4268	VertexAttrib4svNV
4269	VertexAttrib1fvNV
4270	VertexAttrib2fvNV
4271	VertexAttrib3fvNV
4272	VertexAttrib4fvNV
4273	VertexAttrib1dvNV
4274	VertexAttrib2dvNV
4275	VertexAttrib3dvNV
4276	VertexAttrib4dvNV
4277	VertexAttrib4ubvNV
4316	BindRenderbufferEXT
4317	DeleteRenderbuffersEXT
4318	RenderbufferStorageEXT
4319	BindFramebufferEXT
4320	DeleteFramebuffersEXT
4321	FramebufferTexture1DEXT
4322	FramebufferTexture2DEXT
4323	FramebufferTexture3DEXT
4324	FramebufferRenderbufferEXT
4325	GenerateMipmapEXT
END

TYPE LISTID CARD32

CONSTANTS glENUM
0x0000	POINTS
0x0001	LINES
0x0002	LINE_LOOP
0x0003	LINE_STRIP
0x0004	TRIANGLES
0x0005	TRIANGLE_STRIP
0x0006	TRIANGLE_FAN
0x0007	QUADS
0x0008	QUAD_STRIP
0x0009	POLYGON
0x0100	ACCUM
0x0101	LOAD
0x0102	RETURN
0x0103	MULT
0x0104	ADD
0x0200	NEVER
0x0201	LESS
0x0202	EQUAL
0x0203	LEQUAL
0x0204	GREATER
0x0205	NOTEQUAL
0x0206	GEQUAL
0x0207	ALWAYS
0x0300	SRC_COLOR
0x0301	ONE_MINUS_SRC_COLOR
0x0302	SRC_ALPHA
0x0303	ONE_MINUS_SRC_ALPHA
0x0304	DST_ALPHA
0x0305	ONE_MINUS_DST_ALPHA
0x0306	DST_COLOR
0x0307	ONE_MINUS_DST_COLOR
0x0308	SRC_ALPHA_SATURATE
0x0400	FRONT_LEFT
0x0401	FRONT_RIGHT
0x0402	BACK_LEFT
0x0403	BACK_RIGHT
0x0404	FRONT
0x0405	BACK
0x0406	LEFT
0x0407	RIGHT
0x0408	FRONT_AND_BACK
0x0409	AUX0
0x040A	AUX1
0x040B	AUX2
0x040C	AUX3
0x0600	2D
0x0601	3D
0x0602	3D_COLOR
0x0603	3D_COLOR_TEXTURE
0x0604	4D_COLOR_TEXTURE
0x0700	PASS_THROUGH_TOKEN
0x0701	POINT_TOKEN
0x0702	LINE_TOKEN
0x0703	POLYGON_TOKEN
0x0704	BITMAP_TOKEN
0x0705	DRAW_PIXEL_TOKEN
0x0706	COPY_PIXEL_TOKEN
0x0707	LINE_RESET_TOKEN
0x0800	EXP
0x0801	EXP2
0x0900	CW
0x0901	CCW
0x0A00	COEFF
0x0A01	ORDER
0x0A02	DOMAIN
0x0B00	CURRENT_COLOR
0x0B01	CURRENT_INDEX
0x0B02	CURRENT_NORMAL
0x0B03	CURRENT_TEXTURE_COORDS
0x0B04	CURRENT_RASTER_COLOR
0x0B05	CURRENT_RASTER_INDEX
0x0B06	CURRENT_RASTER_TEXTURE_COORDS
0x0B07	CURRENT_RASTER_POSITION
0x0B08	CURRENT_RASTER_POSITION_VALID
0x0B09	CURRENT_RASTER_DISTANCE
0x0B10	POINT_SMOOTH
0x0B11	POINT_SIZE
0x0B12	POINT_SIZE_RANGE
0x0B13	POINT_SIZE_GRANULARITY
0x0B20	LINE_SMOOTH
0x0B21	LINE_WIDTH
0x0B22	LINE_WIDTH_RANGE
0x0B23	LINE_WIDTH_GRANULARITY
0x0B24	LINE_STIPPLE
0x0B25	LINE_STIPPLE_PATTERN
0x0B26	LINE_STIPPLE_REPEAT
0x0B30	LIST_MODE
0x0B31	MAX_LIST_NESTING
0x0B32	LIST_BASE
0x0B33	LIST_INDEX
0x0B40	POLYGON_MODE
0x0B41	POLYGON_SMOOTH
0x0B42	POLYGON_STIPPLE
0x0B43	EDGE_FLAG
0x0B44	CULL_FACE
0x0B45	CULL_FACE_MODE
0x0B46	FRONT_FACE
0x0B50	LIGHTING
0x0B51	LIGHT_MODEL_LOCAL_VIEWER
0x0B52	LIGHT_MODEL_TWO_SIDE
0x0B53	LIGHT_MODEL_AMBIENT
0x0B54	SHADE_MODEL
0x0B55	COLOR_MATERIAL_FACE
0x0B56	COLOR_MATERIAL_PARAMETER
0x0B57	COLOR_MATERIAL
0x0B60	FOG
0x0B61	FOG_INDEX
0x0B62	FOG_DENSITY
0x0B63	FOG_START
0x0B64	FOG_END
0x0B65	FOG_MODE
0x0B66	FOG_COLOR
0x0B70	DEPTH_RANGE
0x0B71	DEPTH_TEST
0x0B72	DEPTH_WRITEMASK
0x0B73	DEPTH_CLEAR_VALUE
0x0B74	DEPTH_FUNC
0x0B80	ACCUM_CLEAR_VALUE
0x0B90	STENCIL_TEST
0x0B91	STENCIL_CLEAR_VALUE
0x0B92	STENCIL_FUNC
0x0B93	STENCIL_VALUE_MASK
0x0B94	STENCIL_FAIL
0x0B95	STENCIL_PASS_DEPTH_FAIL
0x0B96	STENCIL_PASS_DEPTH_PASS
0x0B97	STENCIL_REF
0x0B98	STENCIL_WRITEMASK
0x0BA0	MATRIX_MODE
0x0BA1	NORMALIZE
0x0BA2	VIEWPORT
0x0BA3	MODELVIEW_STACK_DEPTH
0x0BA4	PROJECTION_STACK_DEPTH
0x0BA5	TEXTURE_STACK_DEPTH
0x0BA6	MODELVIEW_MATRIX
0x0BA7	PROJECTION_MATRIX
0x0BA8	TEXTURE_MATRIX
0x0BB0	ATTRIB_STACK_DEPTH
0x0BB1	CLIENT_ATTRIB_STACK_DEPTH
0x0BC0	ALPHA_TEST
0x0BC1	ALPHA_TEST_FUNC
0x0BC2	ALPHA_TEST_REF
0x0BD0	DITHER
0x0BE0	BLEND_DST
0x0BE1	BLEND_SRC
0x0BE2	BLEND
0x0BF0	LOGIC_OP_MODE
0x0BF1	INDEX_LOGIC_OP
0x0BF2	COLOR_LOGIC_OP
0x0C00	AUX_BUFFERS
0x0C01	DRAW_BUFFER
0x0C02	READ_BUFFER
0x0C10	SCISSOR_BOX
0x0C11	SCISSOR_TEST
0x0C20	INDEX_CLEAR_VALUE
0x0C21	INDEX_WRITEMASK
0x0C22	COLOR_CLEAR_VALUE
0x0C23	COLOR_WRITEMASK
0x0C30	INDEX_MODE
0x0C31	RGBA_MODE
0x0C32	DOUBLEBUFFER
0x0C33	STEREO
0x0C40	RENDER_MODE
0x0C50	PERSPECTIVE_CORRECTION_HINT
0x0C51	POINT_SMOOTH_HINT
0x0C52	LINE_SMOOTH_HINT
0x0C53	POLYGON_SMOOTH_HINT
0x0C54	FOG_HINT
0x0C60	TEXTURE_GEN_S
0x0C61	TEXTURE_GEN_T
0x0C62	TEXTURE_GEN_R
0x0C63	TEXTURE_GEN_Q
0x0C70	PIXEL_MAP_I_TO_I
0x0C71	PIXEL_MAP_S_TO_S
0x0C72	PIXEL_MAP_I_TO_R
0x0C73	PIXEL_MAP_I_TO_G
0x0C74	PIXEL_MAP_I_TO_B
0x0C75	PIXEL_MAP_I_TO_A
0x0C76	PIXEL_MAP_R_TO_R
0x0C77	PIXEL_MAP_G_TO_G
0x0C78	PIXEL_MAP_B_TO_B
0x0C79	PIXEL_MAP_A_TO_A
0x0CB0	PIXEL_MAP_I_TO_I_SIZE
0x0CB1	PIXEL_MAP_S_TO_S_SIZE
0x0CB2	PIXEL_MAP_I_TO_R_SIZE
0x0CB3	PIXEL_MAP_I_TO_G_SIZE
0x0CB4	PIXEL_MAP_I_TO_B_SIZE
0x0CB5	PIXEL_MAP_I_TO_A_SIZE
0x0CB6	PIXEL_MAP_R_TO_R_SIZE
0x0CB7	PIXEL_MAP_G_TO_G_SIZE
0x0CB8	PIXEL_MAP_B_TO_B_SIZE
0x0CB9	PIXEL_MAP_A_TO_A_SIZE
0x0CF0	UNPACK_SWAP_BYTES
0x0CF1	UNPACK_LSB_FIRST
0x0CF2	UNPACK_ROW_LENGTH
0x0CF3	UNPACK_SKIP_ROWS
0x0CF4	UNPACK_SKIP_PIXELS
0x0CF5	UNPACK_ALIGNMENT
0x0D00	PACK_SWAP_BYTES
0x0D01	PACK_LSB_FIRST
0x0D02	PACK_ROW_LENGTH
0x0D03	PACK_SKIP_ROWS
0x0D04	PACK_SKIP_PIXELS
0x0D05	PACK_ALIGNMENT
0x0D10	MAP_COLOR
0x0D11	MAP_STENCIL
0x0D12	INDEX_SHIFT
0x0D13	INDEX_OFFSET
0x0D14	RED_SCALE
0x0D15	RED_BIAS
0x0D16	ZOOM_X
0x0D17	ZOOM_Y
0x0D18	GREEN_SCALE
0x0D19	GREEN_BIAS
0x0D1A	BLUE_SCALE
0x0D1B	BLUE_BIAS
0x0D1C	ALPHA_SCALE
0x0D1D	ALPHA_BIAS
0x0D1E	DEPTH_SCALE
0x0D1F	DEPTH_BIAS
0x0D30	MAX_EVAL_ORDER
0x0D31	MAX_LIGHTS
0x0D32	MAX_CLIP_PLANES
0x0D33	MAX_TEXTURE_SIZE
0x0D34	MAX_PIXEL_MAP_TABLE
0x0D35	MAX_ATTRIB_STACK_DEPTH
0x0D36	MAX_MODELVIEW_STACK_DEPTH
0x0D37	MAX_NAME_STACK_DEPTH
0x0D38	MAX_PROJECTION_STACK_DEPTH
0x0D39	MAX_TEXTURE_STACK_DEPTH
0x0D3A	MAX_VIEWPORT_DIMS
0x0D3B	MAX_CLIENT_ATTRIB_STACK_DEPTH
0x0D50	SUBPIXEL_BITS
0x0D51	INDEX_BITS
0x0D52	RED_BITS
0x0D53	GREEN_BITS
0x0D54	BLUE_BITS
0x0D55	ALPHA_BITS
0x0D56	DEPTH_BITS
0x0D57	STENCIL_BITS
0x0D58	ACCUM_RED_BITS
0x0D59	ACCUM_GREEN_BITS
0x0D5A	ACCUM_BLUE_BITS
0x0D5B	ACCUM_ALPHA_BITS
0x0D70	NAME_STACK_DEPTH
0x0D80	AUTO_NORMAL
0x0D90	MAP1_COLOR_4
0x0D91	MAP1_INDEX
0x0D92	MAP1_NORMAL
0x0D93	MAP1_TEXTURE_COORD_1
0x0D94	MAP1_TEXTURE_COORD_2
0x0D95	MAP1_TEXTURE_COORD_3
0x0D96	MAP1_TEXTURE_COORD_4
0x0D97	MAP1_VERTEX_3
0x0D98	MAP1_VERTEX_4
0x0DB0	MAP2_COLOR_4
0x0DB1	MAP2_INDEX
0x0DB2	MAP2_NORMAL
0x0DB3	MAP2_TEXTURE_COORD_1
0x0DB4	MAP2_TEXTURE_COORD_2
0x0DB5	MAP2_TEXTURE_COORD_3
0x0DB6	MAP2_TEXTURE_COORD_4
0x0DB7	MAP2_VERTEX_3
0x0DB8	MAP2_VERTEX_4
0x0DD0	MAP1_GRID_DOMAIN
0x0DD1	MAP1_GRID_SEGMENTS
0x0DD2	MAP2_GRID_DOMAIN
0x0DD3	MAP2_GRID_SEGMENTS
0x0DE0	TEXTURE_1D
0x0DE1	TEXTURE_2D
0x0DF0	FEEDBACK_BUFFER_POINTER
0x0DF1	FEEDBACK_BUFFER_SIZE
0x0DF2	FEEDBACK_BUFFER_TYPE
0x0DF3	SELECTION_BUFFER_POINTER
0x0DF4	SELECTION_BUFFER_SIZE
0x1000	TEXTURE_WIDTH
0x1001	TEXTURE_HEIGHT
0x1003	TEXTURE_COMPONENTS
0x1004	TEXTURE_BORDER_COLOR
0x1005	TEXTURE_BORDER
0x1100	DONT_CARE
0x1101	FASTEST
0x1102	NICEST
0x1200	AMBIENT
0x1201	DIFFUSE
0x1202	SPECULAR
0x1203	POSITION
0x1204	SPOT_DIRECTION
0x1205	SPOT_EXPONENT
0x1206	SPOT_CUTOFF
0x1207	CONSTANT_ATTENUATION
0x1208	LINEAR_ATTENUATION
0x1209	QUADRATIC_ATTENUATION
0x1300	COMPILE
0x1301	COMPILE_AND_EXECUTE
0x1400	BYTE
0x1401	UNSIGNED_BYTE
0x1402	SHORT
0x1403	UNSIGNED_SHORT
0x1404	INT
0x1405	UNSIGNED_INT
0x1406	FLOAT
0x1407	2_BYTES
0x1408	3_BYTES
0x1409	4_BYTES
0x140A	DOUBLE
0x1500	CLEAR
0x1501	AND
0x1502	AND_REVERSE
0x1503	COPY
0x1504	AND_INVERTED
0x1505	NOOP
0x1506	XOR
0x1507	OR
0x1508	NOR
0x1509	EQUIV
0x150A	INVERT
0x150B	OR_REVERSE
0x150C	COPY_INVERTED
0x150D	OR_INVERTED
0x150E	NAND
0x150F	SET
0x1600	EMISSION
0x1601	SHININESS
0x1602	AMBIENT_AND_DIFFUSE
0x1603	COLOR_INDEXES
0x1700	MODELVIEW
0x1701	PROJECTION
0x1702	TEXTURE
0x1800	COLOR
0x1801	DEPTH
0x1802	STENCIL
0x1900	COLOR_INDEX
0x1901	STENCIL_INDEX
0x1902	DEPTH_COMPONENT
0x1903	RED
0x1904	GREEN
0x1905	BLUE
0x1906	ALPHA
0x1907	RGB
0x1908	RGBA
0x1909	LUMINANCE
0x190A	LUMINANCE_ALPHA
0x1A00	BITMAP
0x1B00	POINT
0x1B01	LINE
0x1B02	FILL
0x1C00	RENDER
0x1C01	FEEDBACK
0x1C02	SELECT
0x1D00	FLAT
0x1D01	SMOOTH
0x1E00	KEEP
0x1E01	REPLACE
0x1E02	INCR
0x1E03	DECR
0x1F00	VENDOR
0x1F01	RENDERER
0x1F02	VERSION
0x1F03	EXTENSIONS
0x2000	S
0x2001	T
0x2002	R
0x2003	Q
0x2100	MODULATE
0x2101	DECAL
0x2200	TEXTURE_ENV_MODE
0x2201	TEXTURE_ENV_COLOR
0x2300	TEXTURE_ENV
0x2400	EYE_LINEAR
0x2401	OBJECT_LINEAR
0x2402	SPHERE_MAP
0x2500	TEXTURE_GEN_MODE
0x2501	OBJECT_PLANE
0x2502	EYE_PLANE
0x2600	NEAREST
0x2601	LINEAR
0x2700	NEAREST_MIPMAP_NEAREST
0x2701	LINEAR_MIPMAP_NEAREST
0x2702	NEAREST_MIPMAP_LINEAR
0x2703	LINEAR_MIPMAP_LINEAR
0x2800	TEXTURE_MAG_FILTER
0x2801	TEXTURE_MIN_FILTER
0x2802	TEXTURE_WRAP_S
0x2803	TEXTURE_WRAP_T
0x2900	CLAMP
0x2901	REPEAT
0x2A00	POLYGON_OFFSET_UNITS
0x2A01	POLYGON_OFFSET_POINT
0x2A02	POLYGON_OFFSET_LINE
0x2A10	R3_G3_B2
0x2A20	V2F
0x2A21	V3F
0x2A22	C4UB_V2F
0x2A23	C4UB_V3F
0x2A24	C3F_V3F
0x2A25	N3F_V3F
0x2A26	C4F_N3F_V3F
0x2A27	T2F_V3F
0x2A28	T4F_V4F
0x2A29	T2F_C4UB_V3F
0x2A2A	T2F_C3F_V3F
0x2A2B	T2F_N3F_V3F
0x2A2C	T2F_C4F_N3F_V3F
0x2A2D	T4F_C4F_N3F_V4F
0x3000	CLIP_PLANE0
0x3001	CLIP_PLANE1
0x3002	CLIP_PLANE2
0x3003	CLIP_PLANE3
0x3004	CLIP_PLANE4
0x3005	CLIP_PLANE5
0x4000	LIGHT0
0x4001	LIGHT1
0x4002	LIGHT2
0x4003	LIGHT3
0x4004	LIGHT4
0x4005	LIGHT5
0x4006	LIGHT6
0x4007	LIGHT7
0x8037	POLYGON_OFFSET_FILL
0x8038	POLYGON_OFFSET_FACTOR
0x803B	ALPHA4
0x803C	ALPHA8
0x803D	ALPHA12
0x803E	ALPHA16
0x803F	LUMINANCE4
0x8040	LUMINANCE8
0x8041	LUMINANCE12
0x8042	LUMINANCE16
0x8043	LUMINANCE4_ALPHA4
0x8044	LUMINANCE6_ALPHA2
0x8045	LUMINANCE8_ALPHA8
0x8046	LUMINANCE12_ALPHA4
0x8047	LUMINANCE12_ALPHA12
0x8048	LUMINANCE16_ALPHA16
0x8049	INTENSITY
0x804A	INTENSITY4
0x804B	INTENSITY8
0x804C	INTENSITY12
0x804D	INTENSITY16
0x804F	RGB4
0x8050	RGB5
0x8051	RGB8
0x8052	RGB10
0x8053	RGB12
0x8054	RGB16
0x8055	RGBA2
0x8056	RGBA4
0x8057	RGB5_A1
0x8058	RGBA8
0x8059	RGB10_A2
0x805A	RGBA12
0x805B	RGBA16
0x805C	TEXTURE_RED_SIZE
0x805D	TEXTURE_GREEN_SIZE
0x805E	TEXTURE_BLUE_SIZE
0x805F	TEXTURE_ALPHA_SIZE
0x8060	TEXTURE_LUMINANCE_SIZE
0x8061	TEXTURE_INTENSITY_SIZE
0x8063	PROXY_TEXTURE_1D
0x8064	PROXY_TEXTURE_2D
0x8066	TEXTURE_PRIORITY
0x8067	TEXTURE_RESIDENT
0x8068	TEXTURE_BINDING_1D
0x8069	TEXTURE_BINDING_2D
0x8074	VERTEX_ARRAY
0x8075	NORMAL_ARRAY
0x8076	COLOR_ARRAY
0x8077	INDEX_ARRAY
0x8078	TEXTURE_COORD_ARRAY
0x8079	EDGE_FLAG_ARRAY
0x807A	VERTEX_ARRAY_SIZE
0x807B	VERTEX_ARRAY_TYPE
0x807C	VERTEX_ARRAY_STRIDE
0x807E	NORMAL_ARRAY_TYPE
0x807F	NORMAL_ARRAY_STRIDE
0x8081	COLOR_ARRAY_SIZE
0x8082	COLOR_ARRAY_TYPE
0x8083	COLOR_ARRAY_STRIDE
0x8085	INDEX_ARRAY_TYPE
0x8086	INDEX_ARRAY_STRIDE
0x8088	TEXTURE_COORD_ARRAY_SIZE
0x8089	TEXTURE_COORD_ARRAY_TYPE
0x808A	TEXTURE_COORD_ARRAY_STRIDE
0x808C	EDGE_FLAG_ARRAY_STRIDE
0x808E	VERTEX_ARRAY_POINTER
0x808F	NORMAL_ARRAY_POINTER
0x8090	COLOR_ARRAY_POINTER
0x8091	INDEX_ARRAY_POINTER
0x8092	TEXTURE_COORD_ARRAY_POINTER
0x8093	EDGE_FLAG_ARRAY_POINTER
END
TYPE glENUM ENUM32 glENUM

LIST 2BYTES length 2
SET_COUNTER 2
0	bytes	LISTofCARD8
END
LIST 3BYTES length 3
SET_COUNTER 3
0	bytes	LISTofCARD8
END
LIST 4BYTES length 4
SET_COUNTER 4
0	bytes	LISTofCARD8
END

LIST RenderCommand variable min-length 4
0	length		COUNT16
SIZE COUNT
2	command		ENUM16 gl_command
IF 2 CARD16 $gl_command:Begin
4	mode	glENUM
NEXT 8

ELSEIF 2 CARD16 $gl_command:CallList
4	list	LISTID
NEXT 8

ELSEIF 2 CARD16 $gl_command:CallLists
4	n	COUNT32
8	type	glENUM
IF 8 CARD32 $glENUM:BYTE
12	lists	LISTofINT8
ELSEIF 8 CARD32 $glENUM:UNSIGNED_BYTE
12	lists	LISTofUINT8
ELSEIF 8 CARD32 $glENUM:SHORT
12	lists	LISTofINT16
ELSEIF 8 CARD32 $glENUM:UNSIGNED_SHORT
12	lists	LISTofUINT16
ELSEIF 8 CARD32 $glENUM:2_BYTES
# GL_2_BYTES: TODO: decide how to print
12	lists	LISTof2BYTES
ELSEIF 8 CARD32 $glENUM:3_BYTES
# GL_3_BYTES: TODO: decide how to print
12	lists	LISTof3BYTES
ELSEIF 8 CARD32 $glENUM:INT
12	lists	LISTofINT32
ELSEIF 8 CARD32 $glENUM:UNSIGNED_INT
12	lists	LISTofCARD32
ELSEIF 8 CARD32 $glENUM:FLOAT
12	lists	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:4_BYTES
12	lists	LISTof4BYTES
ELSE
0	n	CARD16
RESET_COUNTER
12	strange-data	LISTofCARD8

ELSEIF 2 CARD16 $gl_command:Clear
# TODO: what's this mask?
4	mask	CARD32
NEXT 8

ELSEIF 2 CARD16 $gl_command:End
NEXT 4

ELSEIF 2 CARD16 $gl_command:Lightfv
4	light	glENUM
8	pname	glENUM
# TODO: don't those floats have a meaning?
IF 8 CARD32 $glENUM:AMBIENT
SET_COUNTER	4
12	data	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:DIFFUSE
SET_COUNTER	4
12	data	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:SPECULAR
SET_COUNTER	4
12	data	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:POSITION
SET_COUNTER	4
12	data	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:SPOT_DIRECTION
SET_COUNTER	3
12	data	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:SPOT_EXPONENT
12	data	FLOAT32
NEXT	16
ELSEIF 8 CARD32 $glENUM:SPOT_CUTOFF
12	data	FLOAT32
NEXT	16
ELSEIF 8 CARD32 $glENUM:CONSTANT_ATTENUATION
12	data	FLOAT32
NEXT	16
ELSEIF 8 CARD32 $glENUM:LINEAR_ATTENUATION
12	data	FLOAT32
NEXT	16
ELSEIF 8 CARD32 $glENUM:QUADRATIC_ATTENUATION
12	data	FLOAT32
NEXT	16
ELSE
8	pname	CARD32
RESET_COUNTER
4	unknown-light	LISTofCARD8

ELSEIF 2 CARD16 $gl_command:ListBase
4	base	CARD32
NEXT 8

ELSEIF 2 CARD16 $gl_command:Materialfv
4	face	glENUM
8	pname	glENUM
# TODO: what is the meaning of those arrays?
IF 8 CARD32 $glENUM:AMBIENT
SET_COUNTER 4
12	data	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:DIFFUSE
SET_COUNTER 4
12	data	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:SPECULAR
SET_COUNTER 4
12	data	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:EMISSION
SET_COUNTER 4
12	data	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:SHININESS
12	data	FLOAT32
NEXT	16
ELSEIF 8 CARD32 $glENUM:AMBIENT_AND_DIFFUSE
SET_COUNTER 4
12	data	LISTofFLOAT32
ELSEIF 8 CARD32 $glENUM:COLOR_INDEXES
SET_COUNTER 3
12	data	LISTofFLOAT32
ELSE
RESET_COUNTER
12	unknown-material-data	LISTofCARD8

ELSEIF 2 CARD16 $gl_command:Normal3fv
SET_COUNTER 3
 4	v	LISTofFLOAT32
NEXT 16

ELSEIF 2 CARD16 $gl_command:PopName
NEXT 4

ELSEIF 2 CARD16 $gl_command:PopAttrib
NEXT 4

ELSEIF 2 CARD16 $gl_command:PopMatrix
NEXT 4

ELSEIF 2 CARD16 $gl_command:PushName
4	name	CARD32
NEXT 8
ELSEIF 2 CARD16 $gl_command:PushAttrib
# TODO: what's this mask?
4	mask	CARD32
NEXT 8
ELSEIF 2 CARD16 $gl_command:PushMatrix
NEXT 4

ELSEIF 2 CARD16 $gl_command:Rotatef
4	angle	FLOAT32
8	x	FLOAT32
12	y	FLOAT32
16	z	FLOAT32
NEXT 20

ELSEIF 2 CARD16 $gl_command:ShadeModel
 4	mode	glENUM
NEXT 8

ELSEIF 2 CARD16 $gl_command:Translatef
 4	x	FLOAT32
 8	y	FLOAT32
12	z	FLOAT32
NEXT 16

ELSEIF 2 CARD16 $gl_command:Vertex3fv
SET_COUNTER 3
 4	v	LISTofFLOAT32
NEXT 16

# TODO: all the other commands still need to be implemented
ELSE
4	unknown	LISTofCARD8
END

REQUEST glXRender
4	context_tag	CARD32
8	"render commands"	LISTofRenderCommand
END

# opcode 2
REQUEST glXRenderLarge
4	context_tag	CARD32
8	req_num	CARD16
10	req_tot	CARD16
12	n	CARD32
END

# opcode 3
REQUEST glXCreateContext
4	context	CARD32
8	visual_id	UINT32
12	screen	CARD32
16	share_list	CARD32
20	is_direct	UINT8
END

# opcode 4
REQUEST glXDestroyContext
4	context	CARD32
END

# opcode 5
REQUEST glXMakeCurrent
4	drawable	CARD32
8	context	CARD32
12	old_context_tag	CARD32
END
RESPONSE glXMakeCurrent
8	new_context_tag	CARD32
END

# opcode 6
REQUEST glXIsDirect
4	context	CARD32
END
RESPONSE glXIsDirect
8	is_direct	UINT8
END

# opcode 7
REQUEST glXQueryVersion
4	client_major_version	UINT32
8	client_minor_version	UINT32
END
RESPONSE glXQueryVersion
8	server_major_version	UINT32
12	server_minor_version	UINT32
END

# opcode 8
REQUEST glXWaitGL
4	context_tag	CARD32
END

# opcode 9
REQUEST glXWaitX
4	context_tag	CARD32
END

# opcode 10
REQUEST glXCopyContext
4	source		CARD32
8	dest		CARD32
12	mask		CARD32
16	context_tag	CARD32
END

# opcode 11
REQUEST glXSwapBuffers
4	context_tag	CARD32
8	drawable	CARD32
END

# opcode 12
REQUEST glXUseXFont
4	context_tag	CARD32
8	font		CARD32
12	first		CARD32
16	count		CARD32
20	list_base	CARD32
END

#opcode 13
REQUEST glXCreateGLXPixmap
4	screen		CARD32
8	visual		CARD32
12	pixmap		CARD32
16	glx_pixmap	CARD32
END

TYPE BOOL32 ENUM32 bool

CONSTANTS proptype
0x20	GLX_VISUAL_CAVEAT_EXT
0x23	GLX_TRANSPARENT_TYPE
0x25	GLX_TRANSPARENT_RED_VALUE
0x26	GLX_TRANSPARENT_GREEN_VALUE
0x27	GLX_TRANSPARENT_BLUE_VALUE
0x28	GLX_TRANSPARENT_ALPHA_VALUE
0x24	GLX_TRANSPARENT_INDEX_VALUE
100001	GLX_SAMPLES_SGIS
100000	GLX_SAMPLE_BUFFERS_SGIS
0x800b	GLX_VISUAL_ID
0x8013	GLX_FBCONFIG_ID
0x8012	GLX_X_RENDERABLE
4	GLX_RGBA
0x8011	GLX_RENDER_TYPE
5	GLX_DOUBLEBUFFER
6	GLX_STEREO
2	GLX_BUFFER_SIZE
3	GLX_LEVEL
7	GLX_AUX_BUFFERS
8	GLX_RED_SIZE
9	GLX_GREEN_SIZE
10	GLX_BLUE_SIZE
11	GLX_ALPHA_SIZE
14	GLX_ACCUM_RED_SIZE
15	GLX_ACCUM_GREEN_SIZE
16	GLX_ACCUM_BLUE_SIZE
17	GLX_ACCUM_ALPHA_SIZE
12	GLX_DEPTH_SIZE
13	GLX_STENCIL_SIZE
0x22	GLX_X_VISUAL_TYPE
0x8060	GLX_SWAP_METHOD_OML
0x8010	GLX_DRAWABLE_TYPE
0x20d0	GLX_BIND_TO_TEXTURE_RGB_EXT
0x20d1	GLX_BIND_TO_TEXTURE_RGBA_EXT
0x20d2	GLX_BIND_TO_MIPMAP_TEXTURE_EXT
0x20d3	GLX_BIND_TO_TEXTURE_TARGETS_EXT
END

STRUCT property length 8
0	type	ENUM32 proptype
4	value	CARD32
END

LIST visualconfig variable min-length 72
0	visualid	CARD32
4	class		CARD32
8	rgba		BOOL32
12	red_size	UINT32
16	green_size	UINT32
20	blue_size	UINT32
24	alpha_size	UINT32
28	accum_red_size	UINT32
32	accum_green_size	UINT32
36	accum_blue_size	UINT32
40	accum_alpha_size	UINT32
44	double_buffer	BOOL32
48	stereo		BOOL32
52	buffer_size	UINT32
56	depth_size	UINT32
60	stencil_size	UINT32
64	aux_buffers	UINT32
68	level		UINT32
GET 0
DECREMENT_COUNT 18
DIVIDE_COUNT 2
72	props	LISTofproperty
END

# opcode 14
REQUEST glXGetVisualConfigs
4	screen	CARD32
END
RESPONSE glXGetVisualConfigs
12	num_properties	UINT32
12	num_properties	PUSH32
8	num_visuals	COUNT32
32	visualconfigs	LISTofvisualconfig
RESET_COUNTER
END

# opcode 15
REQUEST glXDestroyGLXPixmap
4	glx_pixmap	CARD32
END

# opcode 16
REQUEST glXVendorPrivate
4	vendor_code	CARD32
8	context_tag	CARD32
END

CONSTANTS vendor_op
65540	GetFBConfigsSGIX
END

LIST fbconfigattribs variable min-length 8
GET 0
0	props	LISTofproperty
END

# opcode 17
REQUEST glXVendorPrivateWithReply TRANSFER=1
4	vendor_op	ENUM32 vendor_op
4	vendor_op	PUSH32
IF 4 CARD32 $vendor_op:GetFBConfigsSGIX
12	screen	UINT32
ELSE
8	vendor_data	LISTofCARD8
# FIXME proper size
END
RESPONSE glXVendorPrivateWithReply
GET 0
IF STORED CARD32 $vendor_op:GetFBConfigsSGIX
8	num_fbconfigs	COUNT32
12	num_attribs	UINT32
12	num_attribs	PUSH32
32	fbconfigs	LISToffbconfigattribs
RESET_COUNTER
ELSE
RESET_COUNTER
8	data1	LISTofCARD8
#32	data2	LISTofCARD8
END

CONSTANTS server_string
1	GLX_VENDOR
2	GLX_VERSION
3	GLX_EXTENSIONS
END

# opcode 19
REQUEST glXQueryServerString
4	context_tag	CARD32
8	name	ENUM32 server_string
END
RESPONSE glXQueryServerString
12	n	COUNT32
DECREMENT_COUNT 1
32	string	STRING8
#  FIXME proper size
END

# opcode 20
REQUEST glXClientInfo
4	gl_client_major	UINT32
8	gl_client_minor	UINT32
12	n	COUNT32
DECREMENT_COUNT 1
16	extension_string	STRING8
# FIXME proper size
END

# opcode 22
REQUEST glXCreatePixmap
4	screen		CARD32
8	fbconfig	CARD32
12	pixmap		CARD32
16	glx_pixmap	CARD32
20	num_attribs	COUNT32
END

# opcode 23
REQUEST glXDestroyPixmap
4	glx_pixmap	CARD32
END

# opcode 24
REQUEST glXCreateNewContext
4	context		CARD32
8	fbconfig	CARD32
12	screen		CARD32
16	render_type	CARD32
20	share_list	CARD32
24	is_direct	UINT8
25	reserved1	UINT8
26	reserved2	UINT16
END

# opcode 26
REQUEST glXMakeContextCurrent
4	old_context_tag	CARD32
8	write_drawable	CARD32
12	read_drawable	CARD32
16	context		CARD32
END
RESPONSE glXMakeContextCurrent
8	new_context_tag	CARD32
END

# opcode 27
REQUEST glXCreatePbuffer
4	screen		CARD32
8	fbconfig	CARD32
12	pbuffer		CARD32
16	num_attribs	CARD32
END

# opcode 28
REQUEST glXDestroyPbuffer
4	pbuffer		CARD32
END

# opcode 31
REQUEST glXCreateWindow
4	screen		CARD32
8	fbconfig	CARD32
12	window		CARD32
16	glx_window	CARD32
20	num_attribs	CARD32
END

# opcode 32
REQUEST glXDestroyWindow
4	glx_window	CARD32
END

# opcode 117
REQUEST glGetIntegerv
4	context_tag	CARD32
8	pname	CARD32
END
RESPONSE glGetIntegerv
12	n	UINT32
# FIXME extend
END

# opcode 101
REQUEST glNewList
4	context_tag	CARD32
8	list	CARD32
12	mode	CARD32
END

# opcode 102
REQUEST glEndList
4	context_tag	CARD32
END

# opcode 103
REQUEST glDeleteLists
4	context_tag	CARD32
8	list	CARD32
12	range	INT32
END

# opcode 104
REQUEST glGenLists
4	context_tag	CARD32
8	range	INT32
END
RESPONSE glGenLists
8	retval	UINT32
12	unused	LISTofCARD8
END

# opcode 115
REQUEST glGetError
4	context_tag	CARD32
END
RESPONSE glGetError
8	error	UINT32
12	unused	LISTofCARD8
END

# opcode 129
REQUEST glGetString
4	context_tag	CARD32
8	name	glENUM
END
RESPONSE glGetString
12	n	COUNT32
32	string	STRING8
END

# opcode 142
REQUEST glFlush
4	context_tag	CARD32
END

EVENT PbufferClobber
 4	event_type	CARD16
 6	draw_type	CARD16
 8	drawable	CARD32
12	buffer_mask	CARD32
16	aux_buffer	CARD16
18	x	CARD16
20	y	CARD16
22	width	CARD16
24	height	CARD16
26	count	CARD16
END

EOF
