Commit | Line | Data |
---|---|---|
8925f36f AW |
1 | ;;; figl -*- mode: scheme; coding: utf-8 -*- |
2 | ;;; Copyright (C) 2013 Andy Wingo <wingo@pobox.com> | |
3 | ;;; | |
4 | ;;; Figl is free software: you can redistribute it and/or modify it | |
5 | ;;; under the terms of the GNU Lesser General Public License as | |
6 | ;;; published by the Free Software Foundation, either version 3 of the | |
7 | ;;; License, or (at your option) any later version. | |
8 | ;;; | |
9 | ;;; Figl is distributed in the hope that it will be useful, but WITHOUT | |
10 | ;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
11 | ;;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General | |
12 | ;;; Public License for more details. | |
13 | ;;; | |
14 | ;;; You should have received a copy of the GNU Lesser General Public | |
15 | ;;; License along with this program. If not, see | |
16 | ;;; <http://www.gnu.org/licenses/>. | |
17 | ;;; | |
18 | ;;; Derived from upstream OpenGL documentation. | |
19 | ;;; | |
c7b31271 DH |
20 | ;;; Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is |
21 | ;;; licensed under the SGI Free Software B License. For details, see | |
8925f36f AW |
22 | ;;; http://oss.sgi.com/projects/FreeB/ (http://oss.sgi.com/projects/FreeB/). |
23 | ;;; | |
24 | ;;; Automatically generated; you probably don't want to edit this. To | |
25 | ;;; update, run "make update" in the top-level build tree. | |
26 | ;;; | |
27 | ||
28 | (define-module | |
7ec693ed | 29 | (figl glx low-level) |
8925f36f | 30 | #:use-module |
25072f02 | 31 | (figl glx runtime) |
7ec693ed AW |
32 | #:use-module |
33 | (figl glx types) | |
8925f36f AW |
34 | #:export |
35 | (glXChooseFBConfig | |
36 | glXChooseVisual | |
37 | glXCopyContext | |
38 | glXCreateContext | |
39 | glXCreateGLXPixmap | |
40 | glXCreateNewContext | |
41 | glXCreatePbuffer | |
42 | glXCreatePixmap | |
43 | glXCreateWindow | |
44 | glXDestroyContext | |
45 | glXDestroyGLXPixmap | |
46 | glXDestroyPbuffer | |
47 | glXDestroyPixmap | |
48 | glXDestroyWindow | |
49 | glXFreeContextEXT | |
50 | glXGetClientString | |
51 | glXGetConfig | |
52 | glXGetContextIDEXT | |
53 | glXGetCurrentContext | |
54 | glXGetCurrentDisplay | |
55 | glXGetCurrentDrawable | |
56 | glXGetCurrentReadDrawable | |
57 | glXGetFBConfigAttrib | |
58 | glXGetFBConfigs | |
59 | glXGetProcAddress | |
60 | glXGetSelectedEvent | |
61 | glXGetVisualFromFBConfig | |
62 | glXImportContextEXT | |
8925f36f AW |
63 | glXIsDirect |
64 | glXMakeContextCurrent | |
65 | glXMakeCurrent | |
66 | glXQueryContextInfoEXT | |
67 | glXQueryContext | |
68 | glXQueryDrawable | |
69 | glXQueryExtensionsString | |
70 | glXQueryExtension | |
71 | glXQueryServerString | |
72 | glXQueryVersion | |
73 | glXSelectEvent | |
74 | glXSwapBuffers | |
75 | glXUseXFont | |
76 | glXWaitGL | |
77 | glXWaitX)) | |
78 | ||
25072f02 | 79 | (define-glx-procedures |
bb894c9d | 80 | ((glXChooseFBConfig |
00239761 | 81 | (dpy Display-*) |
bb894c9d | 82 | (screen int) |
00239761 AW |
83 | (attrib_list const-int-*) |
84 | (nelements int-*) | |
bb894c9d | 85 | -> |
00239761 | 86 | GLXFBConfig-*)) |
3c9b6116 AW |
87 | "Return a list of GLX frame buffer configurations that match the |
88 | specified attributes. | |
89 | ||
90 | DPY | |
91 | Specifies the connection to the X server. | |
92 | ||
93 | SCREEN | |
94 | Specifies the screen number. | |
95 | ||
96 | ATTRIB_LIST | |
c7b31271 | 97 | Specifies a list of attribute/value pairs. The last attribute must |
3c9b6116 AW |
98 | be `None'. |
99 | ||
100 | NELEMENTS | |
101 | Returns the number of elements in the list returned by | |
102 | `glXChooseFBConfig'. | |
103 | ||
104 | `glXChooseFBConfig' returns GLX frame buffer configurations that match | |
105 | the attributes specified in ATTRIB_LIST, or `NULL' if no matches are | |
c7b31271 | 106 | found. If ATTRIB_LIST is `NULL', then `glXChooseFBConfig' returns an |
3c9b6116 | 107 | array of GLX frame buffer configurations that are available on the |
c7b31271 | 108 | specified screen. If an error occurs, no frame buffer configurations |
3c9b6116 | 109 | exist on the specified screen, or if no frame buffer configurations |
c7b31271 | 110 | match the specified attributes, then `NULL' is returned. Use `XFree' to |
3c9b6116 AW |
111 | free the memory returned by `glXChooseFBConfig'. |
112 | ||
113 | All attributes in ATTRIB_LIST, including boolean attributes, are | |
c7b31271 DH |
114 | immediately followed by the corresponding desired value. The list is |
115 | terminated with `None'. If an attribute is not specified in | |
116 | ATTRIB_LIST, then the default value (see below) is used (and the | |
117 | attribute is said to be specified implicitly). For example, if | |
118 | `GLX_STEREO' is not specified, then it is assumed to be `False'. For | |
119 | some attributes, the default is `GLX_DONT_CARE', meaning that any value | |
120 | is OK for this attribute, so the attribute will not be checked. | |
121 | ||
122 | Attributes are matched in an attribute-specific manner. Some of the | |
3c9b6116 AW |
123 | attributes, such as `GLX_LEVEL', must match the specified value exactly; |
124 | others, such as, `GLX_RED_SIZE' must meet or exceed the specified | |
c7b31271 | 125 | minimum values. If more than one GLX frame buffer configuration is |
3c9b6116 | 126 | found, then a list of configurations, sorted according to the ``best'' |
c7b31271 | 127 | match criteria, is returned. The match criteria for each attribute and |
3c9b6116 AW |
128 | the exact sorting order is defined below. |
129 | ||
130 | The interpretations of the various GLX visual attributes are as follows: | |
131 | ||
132 | `GLX_FBCONFIG_ID' | |
133 | ||
134 | ||
135 | Must be followed by a valid XID that indicates the desired GLX | |
c7b31271 DH |
136 | frame buffer configuration. When a `GLX_FBCONFIG_ID' is specified, |
137 | all attributes are ignored. The default value is `GLX_DONT_CARE'. | |
3c9b6116 AW |
138 | |
139 | `GLX_BUFFER_SIZE' | |
140 | ||
141 | ||
142 | Must be followed by a nonnegative integer that indicates the | |
c7b31271 DH |
143 | desired color index buffer size. The smallest index buffer of at |
144 | least the specified size is preferred. This attribute is ignored | |
145 | if `GLX_COLOR_INDEX_BIT' is not set in `GLX_RENDER_TYPE'. The | |
146 | default value is 0. | |
3c9b6116 AW |
147 | |
148 | `GLX_LEVEL' | |
149 | ||
150 | ||
c7b31271 DH |
151 | Must be followed by an integer buffer-level specification. This |
152 | specification is honored exactly. Buffer level 0 corresponds to | |
153 | the default frame buffer of the display. Buffer level 1 is the | |
154 | first overlay frame buffer, level two the second overlay frame | |
155 | buffer, and so on. Negative buffer levels correspond to underlay | |
156 | frame buffers. The default value is 0. | |
3c9b6116 AW |
157 | |
158 | `GLX_DOUBLEBUFFER' | |
159 | ||
160 | ||
c7b31271 DH |
161 | Must be followed by `True' or `False'. If `True' is specified, |
162 | then only double-buffered frame buffer configurations are | |
163 | considered; if `False' is specified, then only single-buffered | |
164 | frame buffer configurations are considered. The default value is | |
3c9b6116 AW |
165 | `GLX_DONT_CARE'. |
166 | ||
167 | `GLX_STEREO' | |
168 | ||
169 | ||
c7b31271 DH |
170 | Must be followed by `True' or `False'. If `True' is specified, |
171 | then only stereo frame buffer configurations are considered; if | |
172 | `False' is specified, then only monoscopic frame buffer | |
173 | configurations are considered. The default value is `False'. | |
3c9b6116 AW |
174 | |
175 | `GLX_AUX_BUFFERS' | |
176 | ||
177 | ||
178 | Must be followed by a nonnegative integer that indicates the | |
c7b31271 | 179 | desired number of auxiliary buffers. Configurations with the |
3c9b6116 | 180 | smallest number of auxiliary buffers that meet or exceed the |
c7b31271 | 181 | specified number are preferred. The default value is 0. |
3c9b6116 AW |
182 | |
183 | `GLX_RED_SIZE', `GLX_GREEN_SIZE', `GLX_BLUE_SIZE', `GLX_ALPHA_SIZE' | |
184 | ||
185 | ||
186 | Each attribute, if present, must be followed by a nonnegative | |
c7b31271 | 187 | minimum size specification or `GLX_DONT_CARE'. The largest |
3c9b6116 AW |
188 | available total RGBA color buffer size (sum of `GLX_RED_SIZE', |
189 | `GLX_GREEN_SIZE', `GLX_BLUE_SIZE', and `GLX_ALPHA_SIZE') of at | |
190 | least the minimum size specified for each color component is | |
c7b31271 DH |
191 | preferred. If the requested number of bits for a color component |
192 | is 0 or `GLX_DONT_CARE', it is not considered. The default value | |
193 | for each color component is 0. | |
3c9b6116 AW |
194 | |
195 | `GLX_DEPTH_SIZE' | |
196 | ||
197 | ||
c7b31271 | 198 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 199 | this value is zero, frame buffer configurations with no depth |
c7b31271 DH |
200 | buffer are preferred. Otherwise, the largest available depth |
201 | buffer of at least the minimum size is preferred. The default | |
202 | value is 0. | |
3c9b6116 AW |
203 | |
204 | `GLX_STENCIL_SIZE' | |
205 | ||
206 | ||
207 | Must be followed by a nonnegative integer that indicates the | |
c7b31271 DH |
208 | desired number of stencil bitplanes. The smallest stencil buffer |
209 | of at least the specified size is preferred. If the desired value | |
210 | is zero, frame buffer configurations with no stencil buffer are | |
211 | preferred. The default value is 0. | |
3c9b6116 AW |
212 | |
213 | `GLX_ACCUM_RED_SIZE' | |
214 | ||
215 | ||
c7b31271 | 216 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 217 | this value is zero, frame buffer configurations with no red |
c7b31271 | 218 | accumulation buffer are preferred. Otherwise, the largest possible |
3c9b6116 AW |
219 | red accumulation buffer of at least the minimum size is preferred. |
220 | The default value is 0. | |
221 | ||
222 | `GLX_ACCUM_GREEN_SIZE' | |
223 | ||
224 | ||
c7b31271 | 225 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 226 | this value is zero, frame buffer configurations with no green |
c7b31271 | 227 | accumulation buffer are preferred. Otherwise, the largest possible |
3c9b6116 | 228 | green accumulation buffer of at least the minimum size is |
c7b31271 | 229 | preferred. The default value is 0. |
3c9b6116 AW |
230 | |
231 | `GLX_ACCUM_BLUE_SIZE' | |
232 | ||
233 | ||
c7b31271 | 234 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 235 | this value is zero, frame buffer configurations with no blue |
c7b31271 | 236 | accumulation buffer are preferred. Otherwise, the largest possible |
3c9b6116 AW |
237 | blue accumulation buffer of at least the minimum size is preferred. |
238 | The default value is 0. | |
239 | ||
240 | `GLX_ACCUM_ALPHA_SIZE' | |
241 | ||
242 | ||
c7b31271 | 243 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 244 | this value is zero, frame buffer configurations with no alpha |
c7b31271 | 245 | accumulation buffer are preferred. Otherwise, the largest possible |
3c9b6116 | 246 | alpha accumulation buffer of at least the minimum size is |
c7b31271 | 247 | preferred. The default value is 0. |
3c9b6116 AW |
248 | |
249 | `GLX_RENDER_TYPE' | |
250 | ||
251 | ||
252 | Must be followed by a mask indicating which OpenGL rendering modes | |
c7b31271 DH |
253 | the frame buffer configuration must support. Valid bits are |
254 | `GLX_RGBA_BIT' and `GLX_COLOR_INDEX_BIT'. If the mask is set to | |
3c9b6116 AW |
255 | `GLX_RGBA_BIT' | `GLX_COLOR_INDEX_BIT', then only frame buffer |
256 | configurations that can be bound to both RGBA contexts and color | |
c7b31271 | 257 | index contexts will be considered. The default value is |
3c9b6116 AW |
258 | `GLX_RGBA_BIT'. |
259 | ||
260 | `GLX_DRAWABLE_TYPE' | |
261 | ||
262 | ||
263 | Must be followed by a mask indicating which GLX drawable types the | |
c7b31271 DH |
264 | frame buffer configuration must support. Valid bits are |
265 | `GLX_WINDOW_BIT', `GLX_PIXMAP_BIT', and `GLX_PBUFFER_BIT'. For | |
3c9b6116 AW |
266 | example, if mask is set to `GLX_WINDOW_BIT' | `GLX_PIXMAP_BIT', |
267 | only frame buffer configurations that support both windows and GLX | |
c7b31271 | 268 | pixmaps will be considered. The default value is `GLX_WINDOW_BIT'. |
3c9b6116 AW |
269 | |
270 | `GLX_X_RENDERABLE' | |
271 | ||
272 | ||
c7b31271 DH |
273 | Must be followed by `True' or `False'. If `True' is specified, |
274 | then only frame buffer configurations that have associated X | |
275 | visuals (and can be used to render to Windows and/or GLX pixmaps) | |
276 | will be considered. The default value is `GLX_DONT_CARE'. | |
3c9b6116 AW |
277 | |
278 | `GLX_X_VISUAL_TYPE' | |
279 | ||
280 | ||
281 | Must be followed by one of `GLX_TRUE_COLOR', `GLX_DIRECT_COLOR', | |
282 | `GLX_PSEUDO_COLOR', `GLX_STATIC_COLOR', `GLX_GRAY_SCALE', or | |
c7b31271 DH |
283 | `GLX_STATIC_GRAY', indicating the desired X visual type. Not all |
284 | frame buffer configurations have an associated X visual. If | |
3c9b6116 AW |
285 | `GLX_DRAWABLE_TYPE' is specified in ATTRIB_LIST and the mask that |
286 | follows does not have `GLX_WINDOW_BIT' set, then this value is | |
c7b31271 DH |
287 | ignored. It is also ignored if `GLX_X_RENDERABLE' is specified as |
288 | `False'. RGBA rendering may be supported for visuals of type | |
3c9b6116 AW |
289 | `GLX_TRUE_COLOR', `GLX_DIRECT_COLOR', `GLX_PSEUDO_COLOR', or |
290 | `GLX_STATIC_COLOR', but color index rendering is only supported for | |
291 | visuals of type `GLX_PSEUDO_COLOR' or `GLX_STATIC_COLOR' (i.e., | |
c7b31271 | 292 | single-channel visuals). The tokens `GLX_GRAY_SCALE' and |
3c9b6116 | 293 | `GLX_STATIC_GRAY' will not match current OpenGL enabled visuals, |
c7b31271 | 294 | but are included for future use. The default value for |
3c9b6116 AW |
295 | `GLX_X_VISUAL_TYPE' is `GLX_DONT_CARE'. |
296 | ||
297 | `GLX_CONFIG_CAVEAT' | |
298 | ||
299 | ||
300 | Must be followed by one of `GLX_NONE', `GLX_SLOW_CONFIG', | |
c7b31271 | 301 | `GLX_NON_CONFORMANT_CONFIG'. If `GLX_NONE' is specified, then only |
3c9b6116 AW |
302 | frame buffer configurations with no caveats will be considered; if |
303 | `GLX_SLOW_CONFIG' is specified, then only slow frame buffer | |
304 | configurations will be considered; if `GLX_NON_CONFORMANT_CONFIG' | |
305 | is specified, then only nonconformant frame buffer configurations | |
c7b31271 | 306 | will be considered. The default value is `GLX_DONT_CARE'. |
3c9b6116 AW |
307 | |
308 | `GLX_TRANSPARENT_TYPE' | |
309 | ||
310 | ||
311 | Must be followed by one of `GLX_NONE', `GLX_TRANSPARENT_RGB', | |
c7b31271 | 312 | `GLX_TRANSPARENT_INDEX'. If `GLX_NONE' is specified, then only |
3c9b6116 AW |
313 | opaque frame buffer configurations will be considered; if |
314 | `GLX_TRANSPARENT_RGB' is specified, then only transparent frame | |
315 | buffer configurations that support RGBA rendering will be | |
316 | considered; if `GLX_TRANSPARENT_INDEX' is specified, then only | |
317 | transparent frame buffer configurations that support color index | |
c7b31271 | 318 | rendering will be considered. The default value is `GLX_NONE'. |
3c9b6116 AW |
319 | |
320 | `GLX_TRANSPARENT_INDEX_VALUE' | |
321 | ||
322 | ||
323 | Must be followed by an integer value indicating the transparent | |
324 | index value; the value must be between 0 and the maximum frame | |
c7b31271 DH |
325 | buffer value for indices. Only frame buffer configurations that |
326 | use the specified transparent index value will be considered. The | |
327 | default value is `GLX_DONT_CARE'. This attribute is ignored unless | |
3c9b6116 AW |
328 | `GLX_TRANSPARENT_TYPE' is included in ATTRIB_LIST and specified as |
329 | `GLX_TRANSPARENT_INDEX'. | |
330 | ||
331 | `GLX_TRANSPARENT_RED_VALUE' | |
332 | ||
333 | ||
334 | Must be followed by an integer value indicating the transparent red | |
335 | value; the value must be between 0 and the maximum frame buffer | |
c7b31271 DH |
336 | value for red. Only frame buffer configurations that use the |
337 | specified transparent red value will be considered. The default | |
338 | value is `GLX_DONT_CARE'. This attribute is ignored unless | |
3c9b6116 AW |
339 | `GLX_TRANSPARENT_TYPE' is included in ATTRIB_LIST and specified as |
340 | `GLX_TRANSPARENT_RGB'. | |
341 | ||
342 | `GLX_TRANSPARENT_GREEN_VALUE' | |
343 | ||
344 | ||
345 | Must be followed by an integer value indicating the transparent | |
346 | green value; the value must be between 0 and the maximum frame | |
c7b31271 DH |
347 | buffer value for green. Only frame buffer configurations that use |
348 | the specified transparent green value will be considered. The | |
349 | default value is `GLX_DONT_CARE'. This attribute is ignored unless | |
3c9b6116 AW |
350 | `GLX_TRANSPARENT_TYPE' is included in ATTRIB_LIST and specified as |
351 | `GLX_TRANSPARENT_RGB'. | |
352 | ||
353 | `GLX_TRANSPARENT_BLUE_VALUE' | |
354 | ||
355 | ||
356 | Must be followed by an integer value indicating the transparent | |
357 | blue value; the value must be between 0 and the maximum frame | |
c7b31271 DH |
358 | buffer value for blue. Only frame buffer configurations that use |
359 | the specified transparent blue value will be considered. The | |
360 | default value is `GLX_DONT_CARE'. This attribute is ignored unless | |
3c9b6116 AW |
361 | `GLX_TRANSPARENT_TYPE' is included in ATTRIB_LIST and specified as |
362 | `GLX_TRANSPARENT_RGB'. | |
363 | ||
364 | `GLX_TRANSPARENT_ALPHA_VALUE' | |
365 | ||
366 | ||
367 | Must be followed by an integer value indicating the transparent | |
368 | alpha value; the value must be between 0 and the maximum frame | |
c7b31271 DH |
369 | buffer value for alpha. Only frame buffer configurations that use |
370 | the specified transparent alpha value will be considered. The | |
3c9b6116 AW |
371 | default value is `GLX_DONT_CARE'. |
372 | ||
373 | When more than one GLX frame buffer configuration matches the specified | |
c7b31271 | 374 | attributes, a list of matching configurations is returned. The list is |
3c9b6116 AW |
375 | sorted according to the following precedence rules, which are applied in |
376 | ascending order (i.e., configurations that are considered equal by a | |
377 | lower numbered rule are sorted by the higher numbered rule): | |
378 | ||
379 | 1. | |
380 | By `GLX_CONFIG_CAVEAT' where the precedence is `GLX_NONE', | |
381 | `GLX_SLOW_CONFIG', and `GLX_NON_CONFORMANT_CONFIG'. | |
382 | ||
383 | 2. | |
384 | Larger total number of RGBA color components (`GLX_RED_SIZE', | |
385 | `GLX_GREEN_SIZE', `GLX_BLUE_SIZE', plus `GLX_ALPHA_SIZE') that have | |
c7b31271 | 386 | higher number of bits. If the requested number of bits in |
3c9b6116 AW |
387 | ATTRIB_LIST is zero or `GLX_DONT_CARE' for a particular color |
388 | component, then the number of bits for that component is not | |
389 | considered. | |
390 | ||
391 | 3. | |
392 | Smaller `GLX_BUFFER_SIZE'. | |
393 | ||
394 | 4. | |
395 | Single buffered configuration (`GLX_DOUBLEBUFFER' being `False' | |
396 | precedes a double buffered one. | |
397 | ||
398 | 5. | |
399 | Smaller `GLX_AUX_BUFFERS'. | |
400 | ||
401 | 6. | |
402 | Larger `GLX_DEPTH_SIZE'. | |
403 | ||
404 | 7. | |
405 | Smaller `GLX_STENCIL_SIZE'. | |
406 | ||
407 | 8. | |
408 | Larger total number of accumulation buffer color components | |
409 | (`GLX_ACCUM_RED_SIZE', `GLX_ACCUM_GREEN_SIZE', | |
410 | `GLX_ACCUM_BLUE_SIZE', plus `GLX_ACCUM_ALPHA_SIZE') that have | |
c7b31271 | 411 | higher number of bits. If the requested number of bits in |
3c9b6116 AW |
412 | ATTRIB_LIST is zero or `GLX_DONT_CARE' for a particular color |
413 | component, then the number of bits for that component is not | |
414 | considered. | |
415 | ||
416 | 9. | |
417 | By `GLX_X_VISUAL_TYPE' where the precedence order is | |
418 | `GLX_TRUE_COLOR', `GLX_DIRECT_COLOR', `GLX_PSEUDO_COLOR', | |
419 | `GLX_STATIC_COLOR', `GLX_GRAY_SCALE', `GLX_STATIC_GRAY'. | |
420 | ||
421 | `NULL' is returned if an undefined GLX attribute is encountered in | |
422 | ATTRIB_LIST, if SCREEN is invalid, or if DPY does not support the GLX | |
423 | extension.") | |
8925f36f | 424 | |
25072f02 | 425 | (define-glx-procedures |
bb894c9d | 426 | ((glXChooseVisual |
00239761 | 427 | (dpy Display-*) |
bb894c9d | 428 | (screen int) |
00239761 | 429 | (attribList int-*) |
bb894c9d | 430 | -> |
00239761 | 431 | XVisualInfo*)) |
3c9b6116 AW |
432 | "Return a visual that matches specified attributes. |
433 | ||
434 | DPY | |
435 | Specifies the connection to the X server. | |
436 | ||
437 | SCREEN | |
438 | Specifies the screen number. | |
439 | ||
440 | ATTRIBLIST | |
441 | Specifies a list of boolean attributes and integer attribute/value | |
c7b31271 | 442 | pairs. The last attribute must be `None'. |
3c9b6116 AW |
443 | |
444 | `glXChooseVisual' returns a pointer to an XVisualInfo structure | |
c7b31271 | 445 | describing the visual that best meets a minimum specification. The |
3c9b6116 AW |
446 | boolean GLX attributes of the visual that is returned will match the |
447 | specified values, and the integer GLX attributes will meet or exceed the | |
c7b31271 | 448 | specified minimum values. If all other attributes are equivalent, then |
3c9b6116 | 449 | TrueColor and PseudoColor visuals have priority over DirectColor and |
c7b31271 DH |
450 | StaticColor visuals, respectively. If no conforming visual exists, |
451 | `NULL' is returned. To free the data returned by this function, use | |
3c9b6116 AW |
452 | `XFree'. |
453 | ||
454 | All boolean GLX attributes default to `False' except `GLX_USE_GL', which | |
c7b31271 | 455 | defaults to `True'. All integer GLX attributes default to zero. Default |
3c9b6116 AW |
456 | specifications are superseded by attributes included in ATTRIBLIST. |
457 | Boolean attributes included in ATTRIBLIST are understood to be `True'. | |
458 | Integer attributes and enumerated type attributes are followed | |
c7b31271 DH |
459 | immediately by the corresponding desired or minimum value. The list |
460 | must be terminated with `None'. | |
3c9b6116 AW |
461 | |
462 | The interpretations of the various GLX visual attributes are as follows: | |
463 | ||
464 | `GLX_USE_GL' | |
c7b31271 DH |
465 | Ignored. Only visuals that can be rendered with GLX are |
466 | considered. | |
3c9b6116 AW |
467 | |
468 | `GLX_BUFFER_SIZE' | |
469 | Must be followed by a nonnegative integer that indicates the | |
c7b31271 DH |
470 | desired color index buffer size. The smallest index buffer of at |
471 | least the specified size is preferred. Ignored if `GLX_RGBA' is | |
3c9b6116 AW |
472 | asserted. |
473 | ||
474 | `GLX_LEVEL' | |
c7b31271 DH |
475 | Must be followed by an integer buffer-level specification. This |
476 | specification is honored exactly. Buffer level zero corresponds to | |
477 | the main frame buffer of the display. Buffer level one is the | |
478 | first overlay frame buffer, level two the second overlay frame | |
479 | buffer, and so on. Negative buffer levels correspond to underlay | |
480 | frame buffers. | |
3c9b6116 AW |
481 | |
482 | `GLX_RGBA' | |
483 | If present, only TrueColor and DirectColor visuals are considered. | |
484 | Otherwise, only PseudoColor and StaticColor visuals are considered. | |
485 | ||
486 | `GLX_DOUBLEBUFFER' | |
c7b31271 | 487 | If present, only double-buffered visuals are considered. Otherwise, |
3c9b6116 AW |
488 | only single-buffered visuals are considered. |
489 | ||
490 | `GLX_STEREO' | |
c7b31271 | 491 | If present, only stereo visuals are considered. Otherwise, only |
3c9b6116 AW |
492 | monoscopic visuals are considered. |
493 | ||
494 | `GLX_AUX_BUFFERS' | |
495 | Must be followed by a nonnegative integer that indicates the | |
c7b31271 | 496 | desired number of auxiliary buffers. Visuals with the smallest |
3c9b6116 AW |
497 | number of auxiliary buffers that meets or exceeds the specified |
498 | number are preferred. | |
499 | ||
500 | `GLX_RED_SIZE' | |
c7b31271 | 501 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 AW |
502 | this value is zero, the smallest available red buffer is preferred. |
503 | Otherwise, the largest available red buffer of at least the minimum | |
504 | size is preferred. | |
505 | ||
506 | `GLX_GREEN_SIZE' | |
c7b31271 | 507 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 508 | this value is zero, the smallest available green buffer is |
c7b31271 | 509 | preferred. Otherwise, the largest available green buffer of at |
3c9b6116 AW |
510 | least the minimum size is preferred. |
511 | ||
512 | `GLX_BLUE_SIZE' | |
c7b31271 | 513 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 514 | this value is zero, the smallest available blue buffer is |
c7b31271 DH |
515 | preferred. Otherwise, the largest available blue buffer of at |
516 | least the minimum size is preferred. | |
3c9b6116 AW |
517 | |
518 | `GLX_ALPHA_SIZE' | |
c7b31271 | 519 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 520 | this value is zero, the smallest available alpha buffer is |
c7b31271 | 521 | preferred. Otherwise, the largest available alpha buffer of at |
3c9b6116 AW |
522 | least the minimum size is preferred. |
523 | ||
524 | `GLX_DEPTH_SIZE' | |
c7b31271 | 525 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 AW |
526 | this value is zero, visuals with no depth buffer are preferred. |
527 | Otherwise, the largest available depth buffer of at least the | |
528 | minimum size is preferred. | |
529 | ||
530 | `GLX_STENCIL_SIZE' | |
531 | Must be followed by a nonnegative integer that indicates the | |
c7b31271 DH |
532 | desired number of stencil bitplanes. The smallest stencil buffer |
533 | of at least the specified size is preferred. If the desired value | |
534 | is zero, visuals with no stencil buffer are preferred. | |
3c9b6116 AW |
535 | |
536 | `GLX_ACCUM_RED_SIZE' | |
c7b31271 | 537 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 538 | this value is zero, visuals with no red accumulation buffer are |
c7b31271 | 539 | preferred. Otherwise, the largest possible red accumulation buffer |
3c9b6116 AW |
540 | of at least the minimum size is preferred. |
541 | ||
542 | `GLX_ACCUM_GREEN_SIZE' | |
c7b31271 | 543 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 544 | this value is zero, visuals with no green accumulation buffer are |
c7b31271 | 545 | preferred. Otherwise, the largest possible green accumulation |
3c9b6116 AW |
546 | buffer of at least the minimum size is preferred. |
547 | ||
548 | `GLX_ACCUM_BLUE_SIZE' | |
c7b31271 | 549 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 550 | this value is zero, visuals with no blue accumulation buffer are |
c7b31271 DH |
551 | preferred. Otherwise, the largest possible blue accumulation |
552 | buffer of at least the minimum size is preferred. | |
3c9b6116 AW |
553 | |
554 | `GLX_ACCUM_ALPHA_SIZE' | |
c7b31271 | 555 | Must be followed by a nonnegative minimum size specification. If |
3c9b6116 | 556 | this value is zero, visuals with no alpha accumulation buffer are |
c7b31271 | 557 | preferred. Otherwise, the largest possible alpha accumulation |
3c9b6116 AW |
558 | buffer of at least the minimum size is preferred. |
559 | ||
560 | `NULL' is returned if an undefined GLX attribute is encountered in | |
561 | ATTRIBLIST.") | |
8925f36f | 562 | |
25072f02 | 563 | (define-glx-procedures |
bb894c9d | 564 | ((glXCopyContext |
00239761 | 565 | (dpy Display-*) |
bb894c9d AW |
566 | (src GLXContext) |
567 | (dst GLXContext) | |
00239761 | 568 | (mask unsigned-long) |
bb894c9d AW |
569 | -> |
570 | void)) | |
3c9b6116 AW |
571 | "Copy state from one rendering context to another. |
572 | ||
573 | DPY | |
574 | Specifies the connection to the X server. | |
575 | ||
576 | SRC | |
577 | Specifies the source context. | |
578 | ||
579 | DST | |
580 | Specifies the destination context. | |
581 | ||
582 | MASK | |
583 | Specifies which portions of SRC state are to be copied to DST. | |
584 | ||
585 | `glXCopyContext' copies selected groups of state variables from SRC to | |
c7b31271 | 586 | DST. MASK indicates which groups of state variables are to be copied. |
3c9b6116 | 587 | MASK contains the bitwise OR of the same symbolic names that are passed |
c7b31271 | 588 | to the GL command `glPushAttrib'. The single symbolic constant |
3c9b6116 AW |
589 | `GLX_ALL_ATTRIB_BITS' can be used to copy the maximum possible portion |
590 | of rendering state. | |
591 | ||
592 | The copy can be done only if the renderers named by SRC and DST share an | |
c7b31271 DH |
593 | address space. Two rendering contexts share an address space if both |
594 | are nondirect using the same server, or if both are direct and owned by | |
595 | a single process. Note that in the nondirect case it is not necessary | |
596 | for the calling threads to share an address space, only for their | |
597 | related rendering contexts to share an address space. | |
3c9b6116 | 598 | |
c7b31271 | 599 | Not all values for GL state can be copied. For example, pixel pack and |
3c9b6116 | 600 | unpack state, render mode state, and select and feedback state are not |
c7b31271 | 601 | copied. The state that can be copied is exactly the state that is |
3c9b6116 AW |
602 | manipulated by the GL command `glPushAttrib'. |
603 | ||
604 | An implicit `glFlush' is done by `glXCopyContext' if SRC is the current | |
605 | context for the calling thread. | |
606 | ||
607 | `BadMatch' is generated if rendering contexts SRC and DST do not share | |
608 | an address space or were not created with respect to the same screen. | |
609 | ||
610 | `BadAccess' is generated if DST is current to any thread (including the | |
611 | calling thread) at the time `glXCopyContext' is called. | |
612 | ||
613 | `GLXBadCurrentWindow' is generated if SRC is the current context and the | |
614 | current drawable is a window that is no longer valid. | |
615 | ||
616 | `GLXBadContext' is generated if either SRC or DST is not a valid GLX | |
617 | context.") | |
8925f36f | 618 | |
25072f02 | 619 | (define-glx-procedures |
bb894c9d | 620 | ((glXCreateContext |
00239761 AW |
621 | (dpy Display-*) |
622 | (vis XVisualInfo-*) | |
bb894c9d AW |
623 | (shareList GLXContext) |
624 | (direct Bool) | |
625 | -> | |
626 | GLXContext)) | |
3c9b6116 AW |
627 | "Create a new GLX rendering context. |
628 | ||
629 | DPY | |
630 | Specifies the connection to the X server. | |
631 | ||
632 | VIS | |
633 | Specifies the visual that defines the frame buffer resources | |
c7b31271 | 634 | available to the rendering context. It is a pointer to an |
3c9b6116 AW |
635 | `XVisualInfo' structure, not a visual ID or a pointer to a |
636 | `Visual'. | |
637 | ||
638 | SHARELIST | |
c7b31271 | 639 | Specifies the context with which to share display lists. `NULL' |
3c9b6116 AW |
640 | indicates that no sharing is to take place. |
641 | ||
642 | DIRECT | |
643 | Specifies whether rendering is to be done with a direct connection | |
644 | to the graphics system if possible (`True') or through the X server | |
645 | (`False'). | |
646 | ||
647 | `glXCreateContext' creates a GLX rendering context and returns its | |
c7b31271 DH |
648 | handle. This context can be used to render into both windows and GLX |
649 | pixmaps. If `glXCreateContext' fails to create a rendering context, | |
3c9b6116 AW |
650 | `NULL' is returned. |
651 | ||
652 | If DIRECT is `True', then a direct rendering context is created if the | |
653 | implementation supports direct rendering, if the connection is to an X | |
654 | server that is local, and if a direct rendering context is available. | |
655 | (An implementation may return an indirect context when DIRECT is | |
656 | `True'.) If DIRECT is `False', then a rendering context that renders | |
c7b31271 DH |
657 | through the X server is always created. Direct rendering provides a |
658 | performance advantage in some implementations. However, direct | |
659 | rendering contexts cannot be shared outside a single process, and they | |
660 | may be unable to render to GLX pixmaps. | |
3c9b6116 AW |
661 | |
662 | If SHARELIST is not `NULL', then all display-list indexes and | |
663 | definitions are shared by context SHARELIST and by the newly created | |
c7b31271 DH |
664 | context. An arbitrary number of contexts can share a single |
665 | display-list space. However, all rendering contexts that share a single | |
666 | display-list space must themselves exist in the same address space. Two | |
667 | rendering contexts share an address space if both are nondirect using | |
668 | the same server, or if both are direct and owned by a single process. | |
669 | Note that in the nondirect case, it is not necessary for the calling | |
670 | threads to share an address space, only for their related rendering | |
671 | contexts to share an address space. | |
3c9b6116 AW |
672 | |
673 | If the GL version is 1.1 or greater, then all texture objects except | |
674 | object 0 are shared by any contexts that share display lists. | |
675 | ||
676 | `NULL' is returned if execution fails on the client side. | |
677 | ||
678 | `BadMatch' is generated if the context to be created would not share the | |
679 | address space or the screen of the context specified by SHARELIST. | |
680 | ||
681 | `BadValue' is generated if VIS is not a valid visual (for example, if a | |
682 | particular GLX implementation does not support it). | |
683 | ||
684 | `GLXBadContext' is generated if SHARELIST is not a GLX context and is | |
685 | not `NULL'. | |
686 | ||
687 | `BadAlloc' is generated if the server does not have enough resources to | |
688 | allocate the new context.") | |
8925f36f | 689 | |
25072f02 | 690 | (define-glx-procedures |
bb894c9d | 691 | ((glXCreateGLXPixmap |
00239761 AW |
692 | (dpy Display-*) |
693 | (vis XVisualInfo-*) | |
bb894c9d AW |
694 | (pixmap Pixmap) |
695 | -> | |
696 | GLXPixmap)) | |
3c9b6116 AW |
697 | "Create an off-screen GLX rendering area. |
698 | ||
699 | DPY | |
700 | Specifies the connection to the X server. | |
701 | ||
702 | VIS | |
703 | Specifies the visual that defines the structure of the rendering | |
c7b31271 | 704 | area. It is a pointer to an `XVisualInfo' structure, not a visual |
3c9b6116 AW |
705 | ID or a pointer to a `Visual'. |
706 | ||
707 | PIXMAP | |
708 | Specifies the X pixmap that will be used as the front left color | |
709 | buffer of the off-screen rendering area. | |
710 | ||
711 | `glXCreateGLXPixmap' creates an off-screen rendering area and returns | |
c7b31271 DH |
712 | its XID. Any GLX rendering context that was created with respect to VIS |
713 | can be used to render into this off-screen area. Use `glXMakeCurrent' | |
714 | to associate the rendering area with a GLX rendering context. | |
3c9b6116 AW |
715 | |
716 | The X pixmap identified by PIXMAP is used as the front left buffer of | |
c7b31271 | 717 | the resulting off-screen rendering area. All other buffers specified by |
3c9b6116 | 718 | VIS, including color buffers other than the front left buffer, are |
c7b31271 DH |
719 | created without externally visible names. GLX pixmaps with |
720 | double-buffering are supported. However, `glXSwapBuffers' is ignored by | |
3c9b6116 AW |
721 | these pixmaps. |
722 | ||
8925f36f | 723 | Some implementations may not support GLX pixmaps with direct rendering |
3c9b6116 AW |
724 | contexts. |
725 | ||
726 | `BadMatch' is generated if the depth of PIXMAP does not match the depth | |
727 | value reported by core X11 for VIS, or if PIXMAP was not created with | |
728 | respect to the same screen as VIS. | |
729 | ||
730 | `BadValue' is generated if VIS is not a valid XVisualInfo pointer (for | |
731 | example, if a particular GLX implementation does not support this | |
732 | visual). | |
733 | ||
734 | `BadPixmap' is generated if PIXMAP is not a valid pixmap. | |
735 | ||
736 | `BadAlloc' is generated if the server cannot allocate the GLX pixmap.") | |
8925f36f | 737 | |
25072f02 | 738 | (define-glx-procedures |
bb894c9d | 739 | ((glXCreateNewContext |
00239761 | 740 | (dpy Display-*) |
bb894c9d AW |
741 | (config GLXFBConfig) |
742 | (render_type int) | |
743 | (share_list GLXContext) | |
744 | (direct Bool) | |
745 | -> | |
746 | GLXContext)) | |
3c9b6116 AW |
747 | "Create a new GLX rendering context. |
748 | ||
749 | DPY | |
750 | Specifies the connection to the X server. | |
751 | ||
752 | CONFIG | |
753 | Specifies the GLXFBConfig structure with the desired attributes for | |
754 | the context. | |
755 | ||
756 | RENDER_TYPE | |
c7b31271 | 757 | Specifies the type of the context to be created. Must be one of |
3c9b6116 AW |
758 | `GLX_RGBA_TYPE' or `GLX_COLOR_INDEX_TYPE'. |
759 | ||
760 | SHARE_LIST | |
c7b31271 | 761 | Specifies the context with which to share display lists. `NULL' |
3c9b6116 AW |
762 | indicates that no sharing is to take place. |
763 | ||
764 | SHARE_LIST | |
765 | Specifies whether rendering is to be done with a direct connection | |
766 | to the graphics system if possible (`True') or through the X server | |
767 | (`False'). | |
768 | ||
769 | `glXCreateNewContext' creates a GLX rendering context and returns its | |
c7b31271 DH |
770 | handle. This context can be used to render into GLX windows, pixmaps, |
771 | or pixel buffers. If `glXCreateNewContext' fails to create a rendering | |
3c9b6116 AW |
772 | context, `NULL' is returned. |
773 | ||
774 | If RENDER_TYPE is `GLX_RGBA_TYPE', then a context that supports RGBA | |
c7b31271 | 775 | rendering is created. If CONFIG is `GLX_COLOR_INDEX_TYPE', then context |
3c9b6116 AW |
776 | supporting color-index rendering is created. |
777 | ||
778 | If RENDER_TYPE is not `NULL', then all display-list indexes and | |
779 | definitions are shared by context RENDER_TYPE and by the newly created | |
c7b31271 DH |
780 | context. An arbitrary number of contexts can share a single |
781 | display-list space. However, all rendering contexts that share a single | |
782 | display-list space must themselves exist in the same address space. Two | |
783 | rendering contexts share an address space if both are nondirect using | |
784 | the same server, or if both are direct and owned by a single process. | |
785 | Note that in the nondirect case, it is not necessary for the calling | |
786 | threads to share an address space, only for their related rendering | |
787 | contexts to share an address space. | |
3c9b6116 AW |
788 | |
789 | If SHARE_LIST is `True', then a direct-rendering context is created if | |
790 | the implementation supports direct rendering, if the connection is to an | |
791 | X server that is local, and if a direct-rendering context is available. | |
792 | (An implementation may return an indirect context when SHARE_LIST is | |
793 | `True'.) If SHARE_LIST is `False', then a rendering context that renders | |
c7b31271 DH |
794 | through the X server is always created. Direct rendering provides a |
795 | performance advantage in some implementations. However, | |
796 | direct-rendering contexts cannot be shared outside a single process, and | |
797 | they may be unable to render to GLX pixmaps. | |
3c9b6116 AW |
798 | |
799 | `NULL' is returned if execution fails on the client side. | |
800 | ||
801 | `GLXBadContext' is generated if RENDER_TYPE is not a GLX context and is | |
802 | not `NULL'. | |
803 | ||
804 | `GLXBadFBConfig' is generated if CONFIG is not a valid GLXFBConfig. | |
805 | ||
806 | `BadMatch' is generated if the context to be created would not share the | |
807 | address space or the screen of the context specified by RENDER_TYPE. | |
808 | ||
809 | `BadAlloc' is generated if the server does not have enough resources to | |
810 | allocate the new context. | |
811 | ||
812 | `BadValue' is generated if CONFIG is not a valid visual (for example, if | |
813 | a particular GLX implementation does not support it).") | |
8925f36f | 814 | |
25072f02 | 815 | (define-glx-procedures |
bb894c9d | 816 | ((glXCreatePbuffer |
00239761 | 817 | (dpy Display-*) |
bb894c9d | 818 | (config GLXFBConfig) |
00239761 | 819 | (attrib_list const-int-*) |
bb894c9d AW |
820 | -> |
821 | GLXPbuffer)) | |
3c9b6116 AW |
822 | "Create an off-screen rendering area. |
823 | ||
824 | DPY | |
825 | Specifies the connection to the X server. | |
826 | ||
827 | CONFIG | |
828 | Specifies a GLXFBConfig structure with the desired attributes for | |
829 | the window. | |
830 | ||
831 | ATTRIB_LIST | |
832 | Specifies a list of attribute value pairs, which must be terminated | |
c7b31271 DH |
833 | with `None' or `NULL'. Accepted attributes are |
834 | `GLX_PBUFFER_WIDTH', `GLX_PBUFFER_HEIGHT', | |
835 | `GLX_PRESERVED_CONTENTS', and `GLX_LARGEST_PBUFFER'. | |
3c9b6116 AW |
836 | |
837 | `glXCreatePbuffer' creates an off-screen rendering area and returns its | |
c7b31271 DH |
838 | XID. Any GLX rendering context that was created with respect to CONFIG |
839 | can be used to render into this window. Use `glXMakeContextCurrent' to | |
3c9b6116 AW |
840 | associate the rendering area with a GLX rendering context. |
841 | ||
842 | The accepted attributes for a GLXPbuffer are: | |
843 | ||
844 | `GLX_PBUFFER_WIDTH' | |
c7b31271 | 845 | Specify the pixel width of the requested GLXPbuffer. The default |
3c9b6116 AW |
846 | value is 0. |
847 | ||
848 | `GLX_PBUFFER_HEIGHT' | |
c7b31271 | 849 | Specify the pixel height of the requested GLXPbuffer. The default |
3c9b6116 AW |
850 | value is 0. |
851 | ||
852 | `GLX_LARGEST_PBUFFER' | |
853 | Specify to obtain the largest available pixel buffer, if the | |
c7b31271 DH |
854 | requested allocation would have failed. The width and height of |
855 | the allocated pixel buffer will never exceed the specified | |
856 | `GLX_PBUFFER_WIDTH' or `GLX_PBUFFER_HEIGHT', respectively. Use | |
3c9b6116 | 857 | `glXQueryDrawable' to retrieve the dimensions of the allocated |
c7b31271 | 858 | pixel buffer. The default value is `False'. |
3c9b6116 AW |
859 | |
860 | `GLX_PRESERVED_CONTENTS' | |
861 | Specify if the contents of the pixel buffer should be preserved | |
c7b31271 DH |
862 | when a resource conflict occurs. If set to `False', the contents |
863 | of the pixel buffer may be lost at any time. If set to `True', or | |
864 | not specified in ATTRIB_LIST, then the contents of the pixel buffer | |
3c9b6116 | 865 | will be preserved (most likely by copying the contents into main |
c7b31271 | 866 | system memory from the frame buffer). In either case, the client |
3c9b6116 AW |
867 | can register (using `glXSelectEvent', to receive pixel buffer |
868 | clobber events that are generated when the pbuffer contents have | |
869 | been preserved or damaged. | |
870 | ||
871 | GLXPbuffers contain the color and ancillary buffers specified by CONFIG. | |
872 | It is possible to create a pixel buffer with back buffers and to swap | |
873 | those buffers using `glXSwapBuffers'. | |
874 | ||
875 | `BadAlloc' is generated if there are insufficient resources to allocate | |
876 | the requested GLXPbuffer. | |
877 | ||
878 | `GLXBadFBConfig' is generated if CONFIG is not a valid GLXFBConfig. | |
879 | ||
880 | `BadMatch' is generated if CONFIG does not support rendering to pixel | |
881 | buffers (e.g., `GLX_DRAWABLE_TYPE' does not contain `GLX_PBUFFER_BIT').") | |
8925f36f | 882 | |
25072f02 | 883 | (define-glx-procedures |
bb894c9d | 884 | ((glXCreatePixmap |
00239761 | 885 | (dpy Display-*) |
bb894c9d AW |
886 | (config GLXFBConfig) |
887 | (pixmap Pixmap) | |
00239761 | 888 | (attrib_list const-int-*) |
bb894c9d AW |
889 | -> |
890 | GLXPixmap)) | |
3c9b6116 AW |
891 | "Create an off-screen rendering area. |
892 | ||
893 | DPY | |
894 | Specifies the connection to the X server. | |
895 | ||
896 | CONFIG | |
897 | Specifies a GLXFBConfig structure with the desired attributes for | |
898 | the window. | |
899 | ||
900 | PIXMAP | |
901 | Specifies the X pixmap to be used as the rendering area. | |
902 | ||
903 | ATTRIB_LIST | |
c7b31271 | 904 | Currently unused. This must be set to `NULL' or be an empty list |
3c9b6116 AW |
905 | (i.e., one in which the first element is `None'). |
906 | ||
907 | `glXCreatePixmap' creates an off-screen rendering area and returns its | |
c7b31271 DH |
908 | XID. Any GLX rendering context that was created with respect to CONFIG |
909 | can be used to render into this window. Use `glXMakeCurrent' to | |
3c9b6116 AW |
910 | associate the rendering area with a GLX rendering context. |
911 | ||
912 | `BadMatch' is generated if PIXMAP was not created with a visual that | |
913 | corresponds to CONFIG. | |
914 | ||
915 | `BadMatch' is generated if CONFIG does not support rendering to windows | |
916 | (e.g., `GLX_DRAWABLE_TYPE' does not contain `GLX_WINDOW_BIT'). | |
917 | ||
c7b31271 | 918 | `BadWindow' is generated if PIXMAP is not a valid window XID. `BadAlloc' |
3c9b6116 AW |
919 | is generated if there is already a GLXFBConfig associated with PIXMAP. |
920 | ||
921 | `BadAlloc' is generated if the X server cannot allocate a new GLX | |
922 | window. | |
923 | ||
924 | `GLXBadFBConfig' is generated if CONFIG is not a valid GLXFBConfig.") | |
8925f36f | 925 | |
25072f02 | 926 | (define-glx-procedures |
bb894c9d | 927 | ((glXCreateWindow |
00239761 | 928 | (dpy Display-*) |
bb894c9d AW |
929 | (config GLXFBConfig) |
930 | (win Window) | |
00239761 | 931 | (attrib_list const-int-*) |
bb894c9d AW |
932 | -> |
933 | GLXWindow)) | |
3c9b6116 AW |
934 | "Create an on-screen rendering area. |
935 | ||
936 | DPY | |
937 | Specifies the connection to the X server. | |
938 | ||
939 | CONFIG | |
940 | Specifies a GLXFBConfig structure with the desired attributes for | |
941 | the window. | |
942 | ||
943 | WIN | |
944 | Specifies the X window to be used as the rendering area. | |
945 | ||
946 | ATTRIB_LIST | |
c7b31271 | 947 | Currently unused. This must be set to `NULL' or be an empty list |
3c9b6116 AW |
948 | (i.e., one in which the first element is `None'). |
949 | ||
950 | `glXCreateWindow' creates an on-screen rendering area from an existing X | |
c7b31271 DH |
951 | window that was created with a visual matching CONFIG. The XID of the |
952 | GLXWindow is returned. Any GLX rendering context that was created with | |
953 | respect to CONFIG can be used to render into this window. Use | |
3c9b6116 AW |
954 | `glXMakeContextCurrent' to associate the rendering area with a GLX |
955 | rendering context. | |
956 | ||
957 | `BadMatch' is generated if WIN was not created with a visual that | |
958 | corresponds to CONFIG. | |
959 | ||
960 | `BadMatch' is generated if CONFIG does not support rendering to windows | |
961 | (i.e., `GLX_DRAWABLE_TYPE' does not contain `GLX_WINDOW_BIT'). | |
962 | ||
963 | `BadWindow' is generated if WIN is not a valid pixmap XID. | |
964 | ||
965 | `BadAlloc' is generated if there is already a GLXFBConfig associated | |
966 | with WIN. | |
967 | ||
968 | `BadAlloc' is generated if the X server cannot allocate a new GLX | |
969 | window. | |
970 | ||
971 | `GLXBadFBConfig' is generated if CONFIG is not a valid GLXFBConfig.") | |
8925f36f | 972 | |
25072f02 | 973 | (define-glx-procedures |
bb894c9d | 974 | ((glXDestroyContext |
00239761 | 975 | (dpy Display-*) |
bb894c9d AW |
976 | (ctx GLXContext) |
977 | -> | |
978 | void)) | |
3c9b6116 AW |
979 | "Destroy a GLX context. |
980 | ||
981 | DPY | |
982 | Specifies the connection to the X server. | |
983 | ||
984 | CTX | |
985 | Specifies the GLX context to be destroyed. | |
986 | ||
987 | If the GLX rendering context CTX is not current to any thread, | |
c7b31271 DH |
988 | `glXDestroyContext' destroys it immediately. Otherwise, CTX is |
989 | destroyed when it becomes not current to any thread. In either case, | |
990 | the resource ID referenced by CTX is freed immediately. | |
3c9b6116 AW |
991 | |
992 | `GLXBadContext' is generated if CTX is not a valid GLX context.") | |
8925f36f | 993 | |
25072f02 | 994 | (define-glx-procedures |
bb894c9d | 995 | ((glXDestroyGLXPixmap |
00239761 | 996 | (dpy Display-*) |
bb894c9d AW |
997 | (pix GLXPixmap) |
998 | -> | |
999 | void)) | |
3c9b6116 AW |
1000 | "Destroy a GLX pixmap. |
1001 | ||
1002 | DPY | |
1003 | Specifies the connection to the X server. | |
1004 | ||
1005 | PIX | |
1006 | Specifies the GLX pixmap to be destroyed. | |
1007 | ||
1008 | If the GLX pixmap PIX is not current to any client, | |
c7b31271 DH |
1009 | `glXDestroyGLXPixmap' destroys it immediately. Otherwise, PIX is |
1010 | destroyed when it becomes not current to any client. In either case, | |
1011 | the resource ID is freed immediately. | |
3c9b6116 AW |
1012 | |
1013 | `GLXBadPixmap' is generated if PIX is not a valid GLX pixmap.") | |
8925f36f | 1014 | |
25072f02 | 1015 | (define-glx-procedures |
bb894c9d | 1016 | ((glXDestroyPbuffer |
00239761 | 1017 | (dpy Display-*) |
bb894c9d AW |
1018 | (pbuf GLXPbuffer) |
1019 | -> | |
1020 | void)) | |
3c9b6116 AW |
1021 | "Destroy an off-screen rendering area. |
1022 | ||
1023 | DPY | |
1024 | Specifies the connection to the X server. | |
1025 | ||
1026 | PBUF | |
1027 | Specifies the GLXPbuffer to be destroyed. | |
1028 | ||
1029 | `glXDestroyPbuffer' destroys a GLXPbuffer created by `glXCreatePbuffer'. | |
1030 | ||
1031 | `GLXBadPbuffer' is generated if PBUF is not a valid GLXPbuffer.") | |
8925f36f | 1032 | |
25072f02 | 1033 | (define-glx-procedures |
bb894c9d | 1034 | ((glXDestroyPixmap |
00239761 | 1035 | (dpy Display-*) |
bb894c9d AW |
1036 | (pixmap GLXPixmap) |
1037 | -> | |
1038 | void)) | |
3c9b6116 AW |
1039 | "Destroy an off-screen rendering area. |
1040 | ||
1041 | DPY | |
1042 | Specifies the connection to the X server. | |
1043 | ||
1044 | PIXMAP | |
1045 | Specifies the GLXPixmap to be destroyed. | |
1046 | ||
1047 | `glXDestroyPixmap' destroys a GLXPixmap created by `glXCreatePixmap'. | |
1048 | ||
1049 | `GLXBadPixmap' is generated if PIXMAP is not a valid GLXPixmap.") | |
8925f36f | 1050 | |
25072f02 | 1051 | (define-glx-procedures |
bb894c9d | 1052 | ((glXDestroyWindow |
00239761 | 1053 | (dpy Display-*) |
bb894c9d AW |
1054 | (win GLXWindow) |
1055 | -> | |
1056 | void)) | |
3c9b6116 AW |
1057 | "Destroy an on-screen rendering area. |
1058 | ||
1059 | DPY | |
1060 | Specifies the connection to the X server. | |
1061 | ||
1062 | WIN | |
1063 | Specifies the GLXWindow to be destroyed. | |
1064 | ||
1065 | `glXDestroyWindow' destroys a GLXWindow created by `glXCreateWindow'. | |
1066 | ||
1067 | `GLXBadWindow' is generated if WIN is not a valid GLXPixmap.") | |
8925f36f | 1068 | |
25072f02 | 1069 | (define-glx-procedures |
bb894c9d | 1070 | ((glXFreeContextEXT |
00239761 | 1071 | (dpy Display-*) |
bb894c9d AW |
1072 | (ctx GLXContext) |
1073 | -> | |
1074 | void)) | |
3c9b6116 AW |
1075 | "Free client-side memory for imported context. |
1076 | ||
1077 | DPY | |
1078 | Specifies the connection to the X server. | |
1079 | ||
1080 | CTX | |
1081 | Specifies a GLX rendering context. | |
1082 | ||
1083 | `glXFreeContextEXT' frees the client-side part of a GLXContext that was | |
c7b31271 | 1084 | created with `glXImportContextEXT'. `glXFreeContextEXT' does not free |
3c9b6116 AW |
1085 | the server-side context information or the XID associated with the |
1086 | server-side context. | |
1087 | ||
1088 | `glXFreeContextEXT' is part of the `EXT_import_context' extension, not | |
c7b31271 | 1089 | part of the core GLX command set. If _glxextstring(EXT_import_context) |
3c9b6116 AW |
1090 | is included in the string returned by `glXQueryExtensionsString', when |
1091 | called with argument `GLX_EXTENSIONS', extension `EXT_vertex_array' is | |
1092 | supported. | |
1093 | ||
1094 | `GLXBadContext' is generated if CTX does not refer to a valid context.") | |
8925f36f | 1095 | |
25072f02 | 1096 | (define-glx-procedures |
00239761 AW |
1097 | ((glXGetClientString |
1098 | (dpy Display-*) | |
1099 | (name int) | |
1100 | -> | |
1101 | const-char-*)) | |
3c9b6116 AW |
1102 | "Return a string describing the client. |
1103 | ||
1104 | DPY | |
1105 | Specifies the connection to the X server. | |
1106 | ||
1107 | NAME | |
c7b31271 | 1108 | Specifies which string is returned. The symbolic constants |
3c9b6116 AW |
1109 | `GLX_VENDOR', `GLX_VERSION', and `GLX_EXTENSIONS' are accepted. |
1110 | ||
1111 | `glXGetClientString' returns a string describing some aspect of the | |
c7b31271 DH |
1112 | client library. The possible values for NAME are `GLX_VENDOR', |
1113 | `GLX_VERSION', and `GLX_EXTENSIONS'. If NAME is not set to one of these | |
1114 | values, `glXGetClientString' returns `NULL'. The format and contents of | |
3c9b6116 AW |
1115 | the vendor string is implementation dependent. |
1116 | ||
1117 | The extensions string is null-terminated and contains a space-separated | |
c7b31271 | 1118 | list of extension names. (The extension names never contain spaces.) If |
3c9b6116 AW |
1119 | there are no extensions to GLX, then the empty string is returned. |
1120 | ||
1121 | The version string is laid out as follows: | |
1122 | ||
1123 | <major_version.minor_version><space><vendor-specific info> | |
1124 | ||
1125 | Both the major and minor portions of the version number are of arbitrary | |
c7b31271 | 1126 | length. The vendor-specific information is optional. However, if it is |
3c9b6116 | 1127 | present, the format and contents are implementation specific.") |
8925f36f | 1128 | |
25072f02 | 1129 | (define-glx-procedures |
bb894c9d | 1130 | ((glXGetConfig |
00239761 AW |
1131 | (dpy Display-*) |
1132 | (vis XVisualInfo-*) | |
bb894c9d | 1133 | (attrib int) |
00239761 | 1134 | (value int-*) |
bb894c9d AW |
1135 | -> |
1136 | int)) | |
3c9b6116 | 1137 | "Return information about GLX visuals. |
8925f36f | 1138 | |
3c9b6116 AW |
1139 | DPY |
1140 | Specifies the connection to the X server. | |
8925f36f | 1141 | |
3c9b6116 | 1142 | VIS |
c7b31271 | 1143 | Specifies the visual to be queried. It is a pointer to an |
3c9b6116 AW |
1144 | `XVisualInfo' structure, not a visual ID or a pointer to a |
1145 | `Visual'. | |
8925f36f | 1146 | |
3c9b6116 AW |
1147 | ATTRIB |
1148 | Specifies the visual attribute to be returned. | |
1149 | ||
1150 | VALUE | |
1151 | Returns the requested value. | |
1152 | ||
1153 | `glXGetConfig' sets VALUE to the ATTRIB value of windows or GLX pixmaps | |
c7b31271 DH |
1154 | created with respect to VIS. `glXGetConfig' returns an error code if it |
1155 | fails for any reason. Otherwise, zero is returned. | |
3c9b6116 AW |
1156 | |
1157 | ATTRIB is one of the following: | |
1158 | ||
1159 | ||
1160 | ||
1161 | `GLX_USE_GL' | |
1162 | `True' if OpenGL rendering is supported by this visual, `False' | |
1163 | otherwise. | |
1164 | ||
1165 | `GLX_BUFFER_SIZE' | |
c7b31271 | 1166 | Number of bits per color buffer. For RGBA visuals, |
3c9b6116 | 1167 | `GLX_BUFFER_SIZE' is the sum of `GLX_RED_SIZE', `GLX_GREEN_SIZE', |
c7b31271 | 1168 | `GLX_BLUE_SIZE', and `GLX_ALPHA_SIZE'. For color index visuals, |
3c9b6116 AW |
1169 | `GLX_BUFFER_SIZE' is the size of the color indexes. |
1170 | ||
1171 | `GLX_LEVEL' | |
c7b31271 DH |
1172 | Frame buffer level of the visual. Level zero is the default frame |
1173 | buffer. Positive levels correspond to frame buffers that overlay | |
3c9b6116 AW |
1174 | the default buffer, and negative levels correspond to frame buffers |
1175 | that underlay the default buffer. | |
1176 | ||
1177 | `GLX_RGBA' | |
1178 | `True' if color buffers store red, green, blue, and alpha values. | |
1179 | `False' if they store color indexes. | |
1180 | ||
1181 | `GLX_DOUBLEBUFFER' | |
1182 | `True' if color buffers exist in front/back pairs that can be | |
1183 | swapped, `False' otherwise. | |
1184 | ||
1185 | `GLX_STEREO' | |
1186 | `True' if color buffers exist in left/right pairs, `False' | |
1187 | otherwise. | |
1188 | ||
1189 | `GLX_AUX_BUFFERS' | |
c7b31271 | 1190 | Number of auxiliary color buffers that are available. Zero |
3c9b6116 AW |
1191 | indicates that no auxiliary color buffers exist. |
1192 | ||
1193 | `GLX_RED_SIZE' | |
c7b31271 | 1194 | Number of bits of red stored in each color buffer. Undefined if |
3c9b6116 AW |
1195 | `GLX_RGBA' is `False'. |
1196 | ||
1197 | `GLX_GREEN_SIZE' | |
c7b31271 | 1198 | Number of bits of green stored in each color buffer. Undefined if |
3c9b6116 AW |
1199 | `GLX_RGBA' is `False'. |
1200 | ||
1201 | `GLX_BLUE_SIZE' | |
c7b31271 | 1202 | Number of bits of blue stored in each color buffer. Undefined if |
3c9b6116 AW |
1203 | `GLX_RGBA' is `False'. |
1204 | ||
1205 | `GLX_ALPHA_SIZE' | |
c7b31271 | 1206 | Number of bits of alpha stored in each color buffer. Undefined if |
3c9b6116 AW |
1207 | `GLX_RGBA' is `False'. |
1208 | ||
1209 | `GLX_DEPTH_SIZE' | |
1210 | Number of bits in the depth buffer. | |
1211 | ||
1212 | `GLX_STENCIL_SIZE' | |
1213 | Number of bits in the stencil buffer. | |
1214 | ||
1215 | `GLX_ACCUM_RED_SIZE' | |
1216 | Number of bits of red stored in the accumulation buffer. | |
1217 | ||
1218 | `GLX_ACCUM_GREEN_SIZE' | |
1219 | Number of bits of green stored in the accumulation buffer. | |
1220 | ||
1221 | `GLX_ACCUM_BLUE_SIZE' | |
1222 | Number of bits of blue stored in the accumulation buffer. | |
1223 | ||
1224 | `GLX_ACCUM_ALPHA_SIZE' | |
1225 | Number of bits of alpha stored in the accumulation buffer. | |
1226 | ||
1227 | The X protocol allows a single visual ID to be instantiated with | |
c7b31271 DH |
1228 | different numbers of bits per pixel. Windows or GLX pixmaps that will |
1229 | be rendered with OpenGL, however, must be instantiated with a color | |
1230 | buffer depth of `GLX_BUFFER_SIZE'. | |
3c9b6116 AW |
1231 | |
1232 | Although a GLX implementation can export many visuals that support GL | |
c7b31271 | 1233 | rendering, it must support at least one RGBA visual. This visual must |
3c9b6116 | 1234 | have at least one color buffer, a stencil buffer of at least 1 bit, a |
c7b31271 DH |
1235 | depth buffer of at least 12 bits, and an accumulation buffer. Alpha |
1236 | bitplanes are optional in this visual. However, its color buffer size | |
3c9b6116 AW |
1237 | must be as great as that of the deepest `TrueColor', `DirectColor', |
1238 | `PseudoColor', or `StaticColor' visual supported on level zero, and it | |
1239 | must itself be made available on level zero. | |
1240 | ||
1241 | In addition, if the X server exports a `PseudoColor' or `StaticColor' | |
1242 | visual on framebuffer level 0, a color index visual is also required on | |
c7b31271 DH |
1243 | that level. It must have at least one color buffer, a stencil buffer of |
1244 | at least 1 bit, and a depth buffer of at least 12 bits. This visual | |
1245 | must have as many color bitplanes as the deepest `PseudoColor' or | |
3c9b6116 AW |
1246 | `StaticColor' visual supported on level 0. |
1247 | ||
1248 | Applications are best written to select the visual that most closely | |
c7b31271 | 1249 | meets their requirements. Creating windows or GLX pixmaps with |
3c9b6116 AW |
1250 | unnecessary buffers can result in reduced rendering performance as well |
1251 | as poor resource allocation. | |
1252 | ||
1253 | `GLX_NO_EXTENSION' is returned if DPY does not support the GLX | |
1254 | extension. | |
1255 | ||
1256 | `GLX_BAD_SCREEN' is returned if the screen of VIS does not correspond to | |
1257 | a screen. | |
1258 | ||
1259 | `GLX_BAD_ATTRIBUTE' is returned if ATTRIB is not a valid GLX attribute. | |
1260 | ||
1261 | `GLX_BAD_VISUAL' is returned if VIS doesn't support GLX and an attribute | |
1262 | other than `GLX_USE_GL' is requested.") | |
1263 | ||
25072f02 | 1264 | (define-glx-procedures |
bb894c9d | 1265 | ((glXGetContextIDEXT |
09522815 | 1266 | (ctx const-GLXContext) |
bb894c9d AW |
1267 | -> |
1268 | GLXContextID)) | |
3c9b6116 AW |
1269 | "Get the XID for a context.. |
1270 | ||
1271 | CTX | |
1272 | Specifies a GLX rendering context. | |
1273 | ||
1274 | `glXGetContextIDEXT' returns the XID associated with a GLXContext. | |
1275 | ||
1276 | No round trip is forced to the server; unlike most X calls that return a | |
1277 | value, `glXGetContextIDEXT' does not flush any pending events. | |
1278 | ||
1279 | `glXGetContextIDEXT' is part of the `EXT_import_context' extension, not | |
c7b31271 | 1280 | part of the core GLX command set. If _glxextstring(EXT_import_context) |
3c9b6116 AW |
1281 | is included in the string returned by `glXQueryExtensionsString', when |
1282 | called with argument `GLX_EXTENSIONS', extension `EXT_import_context' is | |
1283 | supported. | |
1284 | ||
1285 | `GLXBadContext' is generated if CTX does not refer to a valid context.") | |
1286 | ||
25072f02 | 1287 | (define-glx-procedures |
bb894c9d | 1288 | ((glXGetCurrentContext -> GLXContext)) |
3c9b6116 AW |
1289 | "Return the current context. |
1290 | ||
1291 | `glXGetCurrentContext' returns the current context, as specified by | |
c7b31271 | 1292 | `glXMakeCurrent'. If there is no current context, `NULL' is returned. |
3c9b6116 | 1293 | |
c7b31271 DH |
1294 | `glXGetCurrentContext' returns client-side information. It does not |
1295 | make a round trip to the server.") | |
3c9b6116 | 1296 | |
25072f02 | 1297 | (define-glx-procedures |
00239761 | 1298 | ((glXGetCurrentDisplay -> Display-*)) |
3c9b6116 AW |
1299 | "Get display for current context. |
1300 | ||
c7b31271 | 1301 | `glXGetCurrentDisplay' returns the display for the current context. If |
3c9b6116 AW |
1302 | no context is current, `NULL' is returned. |
1303 | ||
c7b31271 DH |
1304 | `glXGetCurrentDisplay' returns client-side information. It does not |
1305 | make a round-trip to the server, and therefore does not flush any | |
1306 | pending events.") | |
8925f36f | 1307 | |
25072f02 | 1308 | (define-glx-procedures |
bb894c9d | 1309 | ((glXGetCurrentDrawable -> GLXDrawable)) |
3c9b6116 AW |
1310 | "Return the current drawable. |
1311 | ||
1312 | `glXGetCurrentDrawable' returns the current drawable, as specified by | |
c7b31271 | 1313 | `glXMakeCurrent'. If there is no current drawable, `None' is returned. |
3c9b6116 | 1314 | |
c7b31271 | 1315 | `glXGetCurrentDrawable' returns client-side information. It does not |
3c9b6116 | 1316 | make a round trip to the server.") |
8925f36f | 1317 | |
25072f02 | 1318 | (define-glx-procedures |
bb894c9d | 1319 | ((glXGetCurrentReadDrawable -> GLXDrawable)) |
3c9b6116 AW |
1320 | "Return the current drawable. |
1321 | ||
1322 | `glXGetCurrentReadDrawable' returns the current read drawable, as | |
c7b31271 DH |
1323 | specified by `read' parameter of `glXMakeContextCurrent'. If there is |
1324 | no current drawable, `None' is returned. | |
3c9b6116 | 1325 | |
c7b31271 DH |
1326 | `glXGetCurrentReadDrawable' returns client-side information. It does |
1327 | not make a round-trip to the server.") | |
8925f36f | 1328 | |
25072f02 | 1329 | (define-glx-procedures |
bb894c9d | 1330 | ((glXGetFBConfigAttrib |
00239761 | 1331 | (dpy Display-*) |
bb894c9d AW |
1332 | (config GLXFBConfig) |
1333 | (attribute int) | |
00239761 | 1334 | (value int-*) |
bb894c9d AW |
1335 | -> |
1336 | int)) | |
3c9b6116 AW |
1337 | "Return information about a GLX frame buffer configuration. |
1338 | ||
1339 | DPY | |
1340 | Specifies the connection to the X server. | |
1341 | ||
1342 | CONFIG | |
1343 | Specifies the GLX frame buffer configuration to be queried. | |
1344 | ||
1345 | ATTRIBUTE | |
1346 | Specifies the attribute to be returned. | |
1347 | ||
1348 | VALUE | |
1349 | Returns the requested value. | |
1350 | ||
1351 | `glXGetFBConfigAttrib' sets VALUE to the ATTRIBUTE value of GLX | |
c7b31271 DH |
1352 | drawables created with respect to CONFIG. `glXGetFBConfigAttrib' |
1353 | returns an error code if it fails for any reason. Otherwise, `Success' | |
1354 | is returned. | |
3c9b6116 AW |
1355 | |
1356 | ATTRIBUTE is one of the following: | |
1357 | ||
1358 | ||
1359 | ||
1360 | `GLX_FBCONFIG_ID' | |
1361 | XID of the given GLXFBConfig. | |
1362 | ||
1363 | `GLX_BUFFER_SIZE' | |
1364 | ||
1365 | ||
c7b31271 | 1366 | Number of bits per color buffer. If the frame buffer configuration |
3c9b6116 AW |
1367 | supports RGBA contexts, then `GLX_BUFFER_SIZE' is the sum of |
1368 | `GLX_RED_SIZE', `GLX_GREEN_SIZE', `GLX_BLUE_SIZE', and | |
c7b31271 | 1369 | `GLX_ALPHA_SIZE'. If the frame buffer configuration supports only |
3c9b6116 AW |
1370 | color index contexts, `GLX_BUFFER_SIZE' is the size of the color |
1371 | indexes. | |
1372 | ||
1373 | `GLX_LEVEL' | |
1374 | ||
1375 | ||
c7b31271 DH |
1376 | Frame buffer level of the configuration. Level zero is the default |
1377 | frame buffer. Positive levels correspond to frame buffers that | |
3c9b6116 AW |
1378 | overlay the default buffer, and negative levels correspond to frame |
1379 | buffers that underlie the default buffer. | |
1380 | ||
1381 | `GLX_DOUBLEBUFFER' | |
1382 | ||
1383 | ||
1384 | `True' if color buffers exist in front/back pairs that can be | |
1385 | swapped, `False' otherwise. | |
1386 | ||
1387 | `GLX_STEREO' | |
1388 | ||
1389 | ||
1390 | `True' if color buffers exist in left/right pairs, `False' | |
1391 | otherwise. | |
1392 | ||
1393 | `GLX_AUX_BUFFERS' | |
1394 | ||
1395 | ||
c7b31271 | 1396 | Number of auxiliary color buffers that are available. Zero |
3c9b6116 AW |
1397 | indicates that no auxiliary color buffers exist. |
1398 | ||
1399 | `GLX_RED_SIZE' | |
1400 | ||
1401 | ||
c7b31271 | 1402 | Number of bits of red stored in each color buffer. Undefined if |
3c9b6116 AW |
1403 | RGBA contexts are not supported by the frame buffer configuration. |
1404 | ||
1405 | `GLX_GREEN_SIZE' | |
1406 | ||
1407 | ||
c7b31271 | 1408 | Number of bits of green stored in each color buffer. Undefined if |
3c9b6116 AW |
1409 | RGBA contexts are not supported by the frame buffer configuration. |
1410 | ||
1411 | `GLX_BLUE_SIZE' | |
1412 | ||
1413 | ||
c7b31271 | 1414 | Number of bits of blue stored in each color buffer. Undefined if |
3c9b6116 AW |
1415 | RGBA contexts are not supported by the frame buffer configuration. |
1416 | ||
1417 | `GLX_ALPHA_SIZE' | |
1418 | ||
1419 | ||
c7b31271 | 1420 | Number of bits of alpha stored in each color buffer. Undefined if |
3c9b6116 AW |
1421 | RGBA contexts are not supported by the frame buffer configuration. |
1422 | ||
1423 | `GLX_DEPTH_SIZE' | |
1424 | ||
1425 | ||
1426 | Number of bits in the depth buffer. | |
1427 | ||
1428 | `GLX_STENCIL_SIZE' | |
1429 | ||
1430 | ||
1431 | Number of bits in the stencil buffer. | |
1432 | ||
1433 | `GLX_ACCUM_RED_SIZE' | |
1434 | ||
1435 | ||
1436 | Number of bits of red stored in the accumulation buffer. | |
1437 | ||
1438 | `GLX_ACCUM_GREEN_SIZE' | |
1439 | ||
1440 | ||
1441 | Number of bits of green stored in the accumulation buffer. | |
1442 | ||
1443 | `GLX_ACCUM_BLUE_SIZE' | |
1444 | ||
1445 | ||
1446 | Number of bits of blue stored in the accumulation buffer. | |
1447 | ||
1448 | `GLX_ACCUM_ALPHA_SIZE' | |
1449 | ||
1450 | ||
1451 | Number of bits of alpha stored in the accumulation buffer. | |
1452 | ||
1453 | `GLX_RENDER_TYPE' | |
1454 | ||
1455 | ||
1456 | Mask indicating what type of GLX contexts can be made current to | |
c7b31271 | 1457 | the frame buffer configuration. Valid bits are `GLX_RGBA_BIT' and |
3c9b6116 AW |
1458 | `GLX_COLOR_INDEX_BIT'. |
1459 | ||
1460 | `GLX_DRAWABLE_TYPE' | |
1461 | ||
1462 | ||
1463 | Mask indicating what drawable types the frame buffer configuration | |
c7b31271 | 1464 | supports. Valid bits are `GLX_WINDOW_BIT', `GLX_PIXMAP_BIT', and |
3c9b6116 AW |
1465 | `GLX_PBUFFER_BIT'. |
1466 | ||
1467 | `GLX_X_RENDERABLE' | |
1468 | ||
1469 | ||
1470 | `True' if drawables created with the frame buffer configuration can | |
1471 | be rendered to by X. | |
1472 | ||
1473 | `GLX_VISUAL_ID' | |
1474 | ||
1475 | ||
1476 | XID of the corresponding visual, or zero if there is no associated | |
1477 | visual (i.e., if `GLX_X_RENDERABLE' is `False' or | |
1478 | `GLX_DRAWABLE_TYPE' does not have the `GLX_WINDOW_BIT' bit set). | |
1479 | ||
1480 | `GLX_X_VISUAL_TYPE' | |
1481 | ||
1482 | ||
c7b31271 | 1483 | Visual type of associated visual. The returned value will be one |
3c9b6116 AW |
1484 | of: `GLX_TRUE_COLOR', `GLX_DIRECT_COLOR', `GLX_PSEUDO_COLOR', |
1485 | `GLX_STATIC_COLOR', `GLX_GRAY_SCALE', `GLX_STATIC_GRAY', or | |
1486 | `GLX_NONE', if there is no associated visual (i.e., if | |
1487 | `GLX_X_RENDERABLE' is `False' or `GLX_DRAWABLE_TYPE' does not have | |
1488 | the `GLX_WINDOW_BIT' bit set). | |
1489 | ||
1490 | `GLX_CONFIG_CAVEAT' | |
1491 | ||
1492 | ||
1493 | One of `GLX_NONE', `GLX_SLOW_CONFIG', or | |
1494 | `GLX_NON_CONFORMANT_CONFIG', indicating that the frame buffer | |
1495 | configuration has no caveats, some aspect of the frame buffer | |
1496 | configuration runs slower than other frame buffer configurations, | |
1497 | or some aspect of the frame buffer configuration is nonconformant, | |
1498 | respectively. | |
1499 | ||
1500 | `GLX_TRANSPARENT_TYPE' | |
1501 | ||
1502 | ||
1503 | One of `GLX_NONE', `GLX_TRANSPARENT_RGB', `GLX_TRANSPARENT_INDEX', | |
1504 | indicating that the frame buffer configuration is opaque, is | |
1505 | transparent for particular values of red, green, and blue, or is | |
1506 | transparent for particular index values, respectively. | |
1507 | ||
1508 | `GLX_TRANSPARENT_INDEX_VALUE' | |
1509 | ||
1510 | ||
1511 | Integer value between 0 and the maximum frame buffer value for | |
1512 | indices, indicating the transparent index value for the frame | |
c7b31271 | 1513 | buffer configuration. Undefined if `GLX_TRANSPARENT_TYPE' is not |
3c9b6116 AW |
1514 | `GLX_TRANSPARENT_INDEX'. |
1515 | ||
1516 | `GLX_TRANSPARENT_RED_VALUE' | |
1517 | ||
1518 | ||
1519 | Integer value between 0 and the maximum frame buffer value for red, | |
1520 | indicating the transparent red value for the frame buffer | |
c7b31271 | 1521 | configuration. Undefined if `GLX_TRANSPARENT_TYPE' is not |
3c9b6116 AW |
1522 | `GLX_TRANSPARENT_RGB'. |
1523 | ||
1524 | `GLX_TRANSPARENT_GREEN_VALUE' | |
1525 | ||
1526 | ||
1527 | Integer value between 0 and the maximum frame buffer value for | |
1528 | green, indicating the transparent green value for the frame buffer | |
c7b31271 | 1529 | configuration. Undefined if `GLX_TRANSPARENT_TYPE' is not |
3c9b6116 AW |
1530 | `GLX_TRANSPARENT_RGB'. |
1531 | ||
1532 | `GLX_TRANSPARENT_BLUE_VALUE' | |
1533 | ||
1534 | ||
1535 | Integer value between 0 and the maximum frame buffer value for | |
1536 | blue, indicating the transparent blue value for the frame buffer | |
c7b31271 | 1537 | configuration. Undefined if `GLX_TRANSPARENT_TYPE' is not |
3c9b6116 AW |
1538 | `GLX_TRANSPARENT_RGB'. |
1539 | ||
1540 | `GLX_TRANSPARENT_ALPHA_VALUE' | |
1541 | ||
1542 | ||
1543 | Integer value between 0 and the maximum frame buffer value for | |
1544 | alpha, indicating the transparent blue value for the frame buffer | |
c7b31271 | 1545 | configuration. Undefined if `GLX_TRANSPARENT_TYPE' is not |
3c9b6116 AW |
1546 | `GLX_TRANSPARENT_RGB'. |
1547 | ||
1548 | `GLX_MAX_PBUFFER_WIDTH' | |
1549 | ||
1550 | ||
1551 | The maximum width that can be specified to `glXCreatePbuffer'. | |
1552 | ||
1553 | `GLX_MAX_PBUFFER_HEIGHT' | |
1554 | ||
1555 | ||
1556 | The maximum height that can be specified to `glXCreatePbuffer'. | |
1557 | ||
1558 | `GLX_MAX_PBUFFER_PIXELS' | |
1559 | ||
1560 | ||
1561 | The maximum number of pixels (width times height) for a pixel | |
c7b31271 DH |
1562 | buffer. Note that this value may be less than |
1563 | `GLX_MAX_PBUFFER_WIDTH' times `GLX_MAX_PBUFFER_HEIGHT'. Also, this | |
3c9b6116 | 1564 | value is static and assumes that no other pixel buffers or X |
c7b31271 | 1565 | resources are contending for the frame buffer memory. As a result, |
3c9b6116 AW |
1566 | it may not be possible to allocate a pixel buffer of the size given |
1567 | by `GLX_MAX_PBUFFER_PIXELS'. | |
1568 | ||
1569 | Applications should choose the frame buffer configuration that most | |
c7b31271 | 1570 | closely meets their requirements. Creating windows, GLX pixmaps, or GLX |
3c9b6116 AW |
1571 | pixel buffers with unnecessary buffers can result in reduced rendering |
1572 | performance as well as poor resource allocation. | |
1573 | ||
1574 | `GLX_NO_EXTENSION' is returned if DPY does not support the GLX | |
c7b31271 | 1575 | extension. `GLX_BAD_ATTRIBUTE' is returned if ATTRIBUTE is not a valid |
3c9b6116 | 1576 | GLX attribute.") |
8925f36f | 1577 | |
25072f02 | 1578 | (define-glx-procedures |
bb894c9d | 1579 | ((glXGetFBConfigs |
00239761 | 1580 | (dpy Display-*) |
bb894c9d | 1581 | (screen int) |
00239761 | 1582 | (nelements int-*) |
bb894c9d | 1583 | -> |
00239761 | 1584 | GLXFBConfig-*)) |
3c9b6116 AW |
1585 | "List all GLX frame buffer configurations for a given screen. |
1586 | ||
1587 | DPY | |
1588 | Specifies the connection to the X server. | |
1589 | ||
1590 | SCREEN | |
1591 | Specifies the screen number. | |
1592 | ||
1593 | NELEMENTS | |
1594 | Returns the number of GLXFBConfigs returned. | |
1595 | ||
1596 | `glXGetFBConfigs' returns a list of all GLXFBConfigs available on the | |
c7b31271 | 1597 | screen specified by SCREEN. Use `glXGetFBConfigAttrib' to obtain |
3c9b6116 | 1598 | attribute values from a specific GLXFBConfig.") |
8925f36f | 1599 | |
25072f02 | 1600 | (define-glx-procedures |
bb894c9d | 1601 | ((glXGetProcAddress |
00239761 | 1602 | (procName const-GLubyte-*) |
bb894c9d AW |
1603 | -> |
1604 | #{void\x28;*\x29;\x28;\x29;}#)) | |
3c9b6116 AW |
1605 | "Obtain a pointer to an OpenGL or GLX function. |
1606 | ||
1607 | PROCNAME | |
1608 | Specifies the name of the OpenGL or GLX function whose address is | |
1609 | to be returned. | |
1610 | ||
1611 | `glXGetProcAddress' returns the address of the function specified in | |
c7b31271 | 1612 | PROCNAME. This is necessary in environments where the OpenGL link |
3c9b6116 | 1613 | library exports a different set of functions than the runtime library.") |
8925f36f | 1614 | |
25072f02 | 1615 | (define-glx-procedures |
bb894c9d | 1616 | ((glXGetSelectedEvent |
00239761 | 1617 | (dpy Display-*) |
bb894c9d | 1618 | (draw GLXDrawable) |
00239761 | 1619 | (event_mask unsigned-long-*) |
bb894c9d AW |
1620 | -> |
1621 | void)) | |
3c9b6116 AW |
1622 | "Returns GLX events that are selected for a window or a GLX pixel buffer. |
1623 | ||
1624 | DPY | |
1625 | Specifies the connection to the X server. | |
1626 | ||
1627 | DRAW | |
c7b31271 | 1628 | Specifies a GLX drawable. Must be a GLX pixel buffer or a window. |
3c9b6116 AW |
1629 | |
1630 | EVENT_MASK | |
1631 | Returns the events that are selected for DRAW. | |
1632 | ||
1633 | `glXGetSelectedEvent' returns in EVENT_MASK the events selected for | |
1634 | DRAW. | |
1635 | ||
1636 | `GLXBadDrawable' is generated if DRAW is not a valid window or a valid | |
1637 | GLX pixel buffer.") | |
8925f36f | 1638 | |
25072f02 | 1639 | (define-glx-procedures |
bb894c9d | 1640 | ((glXGetVisualFromFBConfig |
00239761 | 1641 | (dpy Display-*) |
bb894c9d AW |
1642 | (config GLXFBConfig) |
1643 | -> | |
00239761 | 1644 | XVisualInfo-*)) |
3c9b6116 AW |
1645 | "Return visual that is associated with the frame buffer configuration. |
1646 | ||
1647 | DPY | |
1648 | Specifies the connection to the X server. | |
1649 | ||
1650 | CONFIG | |
1651 | Specifies the GLX frame buffer configuration. | |
1652 | ||
1653 | If CONFIG is a valid GLX frame buffer configuration and it has an | |
1654 | associated X Visual, then information describing that visual is | |
c7b31271 | 1655 | returned; otherwise `NULL' is returned. Use `XFree' to free the data |
3c9b6116 AW |
1656 | returned. |
1657 | ||
1658 | Returns `NULL' if CONFIG is not a valid GLXFBConfig.") | |
8925f36f | 1659 | |
25072f02 | 1660 | (define-glx-procedures |
bb894c9d | 1661 | ((glXImportContextEXT |
00239761 | 1662 | (dpy Display-*) |
bb894c9d AW |
1663 | (contextID GLXContextID) |
1664 | -> | |
1665 | GLXContext)) | |
3c9b6116 AW |
1666 | "Import another process's indirect rendering context.. |
1667 | ||
1668 | DPY | |
1669 | Specifies the connection to the X server. | |
1670 | ||
1671 | CONTEXTID | |
1672 | Specifies a GLX rendering context. | |
1673 | ||
1674 | `glXImportContextEXT' creates a GLXContext given the XID of an existing | |
c7b31271 | 1675 | GLXContext. It may be used in place of `glXCreateContext', to share |
3c9b6116 AW |
1676 | another process's indirect rendering context. |
1677 | ||
1678 | Only the server-side context information can be shared between X | |
1679 | clients; client-side state, such as pixel storage modes, cannot be | |
c7b31271 DH |
1680 | shared. Thus, `glXImportContextEXT' must allocate memory to store |
1681 | client-side information. This memory is freed by calling | |
3c9b6116 AW |
1682 | `glXFreeContextEXT'. |
1683 | ||
c7b31271 DH |
1684 | This call does not create a new XID. It merely makes an existing object |
1685 | available to the importing client (Display *). Like any XID, it goes | |
3c9b6116 | 1686 | away when the creating client drops its connection or the ID is |
c7b31271 DH |
1687 | explicitly deleted. Note that this is when the XID goes away. The |
1688 | object goes away when the XID goes away AND the context is not current | |
1689 | to any thread. | |
3c9b6116 AW |
1690 | |
1691 | If CONTEXTID refers to a direct rendering context then no error is | |
1692 | generated but `glXImportContextEXT' returns NULL. | |
1693 | ||
1694 | `glXImportContextEXT' is part of the `EXT_import_context' extension, not | |
c7b31271 | 1695 | part of the core GLX command set. If _glxextstring(EXT_import_context) |
3c9b6116 AW |
1696 | is included in the string returned by `glXQueryExtensionsString', when |
1697 | called with argument `GLX_EXTENSIONS', extension `EXT_import_context' is | |
1698 | supported. | |
1699 | ||
1700 | `GLXBadContext' is generated if CONTEXTID does not refer to a valid | |
1701 | context.") | |
8925f36f | 1702 | |
25072f02 | 1703 | (define-glx-procedures |
00239761 AW |
1704 | ((glXIsDirect |
1705 | (dpy Display-*) | |
1706 | (ctx GLXContext) | |
1707 | -> | |
1708 | Bool)) | |
3c9b6116 AW |
1709 | "Indicate whether direct rendering is enabled. |
1710 | ||
1711 | DPY | |
1712 | Specifies the connection to the X server. | |
1713 | ||
1714 | CTX | |
1715 | Specifies the GLX context that is being queried. | |
1716 | ||
1717 | `glXIsDirect' returns `True' if CTX is a direct rendering context, | |
c7b31271 | 1718 | `False' otherwise. Direct rendering contexts pass rendering commands |
3c9b6116 | 1719 | directly from the calling process's address space to the rendering |
c7b31271 | 1720 | system, bypassing the X server. Nondirect rendering contexts pass all |
3c9b6116 AW |
1721 | rendering commands to the X server. |
1722 | ||
1723 | `GLXBadContext' is generated if CTX is not a valid GLX context.") | |
8925f36f | 1724 | |
25072f02 | 1725 | (define-glx-procedures |
bb894c9d | 1726 | ((glXMakeContextCurrent |
00239761 | 1727 | (display Display-*) |
bb894c9d AW |
1728 | (draw GLXDrawable) |
1729 | (read GLXDrawable) | |
1730 | (ctx GLXContext) | |
1731 | -> | |
1732 | Bool)) | |
3c9b6116 AW |
1733 | "Attach a GLX context to a GLX drawable. |
1734 | ||
1735 | DISPLAY | |
1736 | Specifies the connection to the X server. | |
1737 | ||
1738 | DRAW | |
c7b31271 | 1739 | Specifies a GLX drawable to render into. Must be an XID |
3c9b6116 AW |
1740 | representing a GLXWindow, GLXPixmap, or GLXPbuffer. |
1741 | ||
1742 | READ | |
c7b31271 | 1743 | Specifies a GLX drawable to read from. Must be an XID representing |
3c9b6116 AW |
1744 | a GLXWindow, GLXPixmap, or GLXPbuffer. |
1745 | ||
1746 | CTX | |
1747 | Specifies the GLX context to be bound to READ and CTX. | |
1748 | ||
1749 | `glXMakeContextCurrent' binds CTX to the current rendering thread and to | |
c7b31271 | 1750 | the DRAW and READ GLX drawables. DRAW and READ may be the same. |
3c9b6116 AW |
1751 | |
1752 | DRAW is used for all OpenGL operations except: | |
1753 | ||
1754 | Any pixel data that are read based on the value of `GLX_READ_BUFFER'. | |
1755 | Note that accumulation operations use the value of `GLX_READ_BUFFER', | |
1756 | but are not allowed unless DRAW is identical to READ. | |
1757 | ||
1758 | Any depth values that are retrieved by `glReadPixels' or `glCopyPixels'. | |
1759 | ||
1760 | Any stencil values that are retrieved by `glReadPixels' or | |
1761 | `glCopyPixels'. | |
1762 | ||
1763 | Frame buffer values are taken from DRAW. | |
1764 | ||
8925f36f | 1765 | If the current rendering thread has a current rendering context, that |
3c9b6116 AW |
1766 | context is flushed and replaced by CTX. |
1767 | ||
1768 | The first time that CTX is made current, the viewport and scissor | |
c7b31271 | 1769 | dimensions are set to the size of the DRAW drawable. The viewport and |
3c9b6116 AW |
1770 | scissor are not modified when CTX is subsequently made current. |
1771 | ||
1772 | To release the current context without assigning a new one, call | |
1773 | `glXMakeContextCurrent' with DRAW and READ set to `None' and CTX set to | |
1774 | `NULL'. | |
1775 | ||
1776 | `glXMakeContextCurrent' returns `True' if it is successful, `False' | |
c7b31271 | 1777 | otherwise. If `False' is returned, the previously current rendering |
3c9b6116 AW |
1778 | context and drawable (if any) remain unchanged. |
1779 | ||
1780 | `BadMatch' is generated if DRAW and READ are not compatible. | |
1781 | ||
1782 | `BadAccess' is generated if CTX is current to some other thread. | |
1783 | ||
1784 | `GLXContextState' is generated if there is a current rendering context | |
1785 | and its render mode is either `GLX_FEEDBACK' or `GLX_SELECT'. | |
1786 | ||
1787 | `GLXBadContext' is generated if CTX is not a valid GLX rendering | |
1788 | context. | |
1789 | ||
1790 | `GLXBadDrawable' is generated if DRAW or READ is not a valid GLX | |
1791 | drawable. | |
1792 | ||
1793 | `GLXBadWindow' is generated if the underlying X window for either DRAW | |
1794 | or READ is no longer valid. | |
1795 | ||
1796 | `GLXBadCurrentDrawable' is generated if the previous context of the | |
1797 | calling thread has unflushed commands and the previous drawable is no | |
1798 | longer valid. | |
1799 | ||
1800 | `BadAlloc' is generated if the X server does not have enough resources | |
1801 | to allocate the buffers. | |
1802 | ||
1803 | `BadMatch' is generated if: | |
1804 | ||
1805 | DRAW and READ cannot fit into frame buffer memory simultaneously. | |
1806 | ||
1807 | DRAW or READ is a GLXPixmap and CTX is a direct-rendering context. | |
1808 | ||
1809 | DRAW or READ is a GLXPixmap and CTX was previously bound to a GLXWindow | |
1810 | or GLXPbuffer. | |
1811 | ||
1812 | DRAW or READ is a GLXWindow or GLXPbuffer and CTX was previously bound | |
1813 | to a GLXPixmap.") | |
8925f36f | 1814 | |
25072f02 | 1815 | (define-glx-procedures |
bb894c9d | 1816 | ((glXMakeCurrent |
00239761 | 1817 | (dpy Display-*) |
bb894c9d AW |
1818 | (drawable GLXDrawable) |
1819 | (ctx GLXContext) | |
1820 | -> | |
1821 | Bool)) | |
3c9b6116 AW |
1822 | "Attach a GLX context to a window or a GLX pixmap. |
1823 | ||
1824 | DPY | |
1825 | Specifies the connection to the X server. | |
1826 | ||
1827 | DRAWABLE | |
c7b31271 | 1828 | Specifies a GLX drawable. Must be either an X window ID or a GLX |
3c9b6116 AW |
1829 | pixmap ID. |
1830 | ||
1831 | CTX | |
1832 | Specifies a GLX rendering context that is to be attached to | |
1833 | DRAWABLE. | |
1834 | ||
1835 | `glXMakeCurrent' does two things: It makes CTX the current GLX rendering | |
1836 | context of the calling thread, replacing the previously current context | |
1837 | if there was one, and it attaches CTX to a GLX drawable, either a window | |
c7b31271 | 1838 | or a GLX pixmap. As a result of these two actions, subsequent GL |
3c9b6116 | 1839 | rendering calls use rendering context CTX to modify GLX drawable |
c7b31271 | 1840 | DRAWABLE (for reading and writing). Because `glXMakeCurrent' always |
3c9b6116 AW |
1841 | replaces the current rendering context with CTX, there can be only one |
1842 | current context per thread. | |
1843 | ||
1844 | Pending commands to the previous context, if any, are flushed before it | |
1845 | is released. | |
1846 | ||
1847 | The first time CTX is made current to any thread, its viewport is set to | |
c7b31271 | 1848 | the full size of DRAWABLE. Subsequent calls by any thread to |
3c9b6116 AW |
1849 | `glXMakeCurrent' with CTX have no effect on its viewport. |
1850 | ||
1851 | To release the current context without assigning a new one, call | |
1852 | `glXMakeCurrent' with DRAWABLE set to `None' and CTX set to `NULL'. | |
1853 | ||
1854 | `glXMakeCurrent' returns `True' if it is successful, `False' otherwise. | |
1855 | If `False' is returned, the previously current rendering context and | |
1856 | drawable (if any) remain unchanged. | |
1857 | ||
1858 | `BadMatch' is generated if DRAWABLE was not created with the same X | |
c7b31271 DH |
1859 | screen and visual as CTX. It is also generated if DRAWABLE is `None' |
1860 | and CTX is not `NULL'. | |
3c9b6116 AW |
1861 | |
1862 | `BadAccess' is generated if CTX was current to another thread at the | |
1863 | time `glXMakeCurrent' was called. | |
1864 | ||
1865 | `GLXBadDrawable' is generated if DRAWABLE is not a valid GLX drawable. | |
1866 | ||
1867 | `GLXBadContext' is generated if CTX is not a valid GLX context. | |
1868 | ||
1869 | `GLXBadContextState' is generated if `glXMakeCurrent' is executed | |
1870 | between the execution of `glBegin' and the corresponding execution of | |
1871 | `glEnd'. | |
1872 | ||
1873 | `GLXBadContextState' is also generated if the rendering context current | |
1874 | to the calling thread has GL renderer state `GLX_FEEDBACK' or | |
1875 | `GLX_SELECT'. | |
1876 | ||
1877 | `GLXBadCurrentWindow' is generated if there are pending GL commands for | |
1878 | the previous context and the current drawable is a window that is no | |
1879 | longer valid. | |
1880 | ||
1881 | `BadAlloc' may be generated if the server has delayed allocation of | |
1882 | ancillary buffers until `glXMakeCurrent' is called, only to find that it | |
1883 | has insufficient resources to complete the allocation.") | |
8925f36f | 1884 | |
25072f02 | 1885 | (define-glx-procedures |
bb894c9d | 1886 | ((glXQueryContextInfoEXT |
00239761 | 1887 | (dpy Display-*) |
bb894c9d AW |
1888 | (ctx GLXContext) |
1889 | (attribute int) | |
00239761 | 1890 | (value int-*) |
bb894c9d AW |
1891 | -> |
1892 | int)) | |
3c9b6116 AW |
1893 | "Query context information. |
1894 | ||
1895 | DPY | |
1896 | Specifies the connection to the X server. | |
1897 | ||
1898 | CTX | |
1899 | Specifies a GLX rendering context. | |
1900 | ||
1901 | ATTRIBUTE | |
c7b31271 DH |
1902 | Specifies that a context parameter should be retrieved. Must be |
1903 | one of `GLX_SHARED_CONTEXT_EXT', `GLX_VISUAL_ID_EXT', or | |
3c9b6116 AW |
1904 | `GLX_SCREEN_EXT'. |
1905 | ||
1906 | VALUE | |
1907 | Contains the return value for ATTRIBUTE. | |
1908 | ||
1909 | `glXQueryContextInfoEXT' sets VALUE to the value of ATTRIBUTE with | |
c7b31271 DH |
1910 | respect to CTX. `glXQueryContextInfoEXT' returns an error code if it |
1911 | fails for any reason. Otherwise, `Success' is returned. | |
3c9b6116 AW |
1912 | |
1913 | ATTRIBUTE may be one of the following: | |
1914 | ||
1915 | `GLX_SHARED_CONTEXT_EXT' | |
1916 | Returns the XID of the share list context associated with CTX at | |
1917 | its creation. | |
1918 | ||
1919 | `GLX_VISUAL_ID_EXT' | |
1920 | Returns the XID of the GLX Visual associated with CTX. | |
1921 | ||
1922 | `GLX_SCREEN_EXT' | |
1923 | Returns the screen number associated with CTX. | |
1924 | ||
1925 | This call may cause a round-trip to the server. | |
1926 | ||
1927 | `glXQueryContextInfoEXT' is part of the `EXT_import_context' extension, | |
c7b31271 | 1928 | not part of the core GLX command set. If |
3c9b6116 AW |
1929 | _glxextstring(EXT_import_context) is included in the string returned by |
1930 | `glXQueryExtensionsString', when called with argument `GLX_EXTENSIONS', | |
1931 | extension `EXT_import_context' is supported. | |
1932 | ||
1933 | `GLXBadContext' is generated if CTX does not refer to a valid context. | |
1934 | ||
1935 | `GLX_BAD_ATTRIBUTE' is returned if ATTRIBUTE is not a valid GLX context | |
1936 | attribute. | |
1937 | ||
1938 | fred `GLX_BAD_CONTEXT' is returned if ATTRIBUTE is not a valid context.") | |
8925f36f | 1939 | |
25072f02 | 1940 | (define-glx-procedures |
bb894c9d | 1941 | ((glXQueryContext |
00239761 | 1942 | (dpy Display-*) |
bb894c9d AW |
1943 | (ctx GLXContext) |
1944 | (attribute int) | |
00239761 | 1945 | (value int-*) |
bb894c9d AW |
1946 | -> |
1947 | int)) | |
3c9b6116 AW |
1948 | "Query context information. |
1949 | ||
1950 | DPY | |
1951 | Specifies the connection to the X server. | |
1952 | ||
1953 | CTX | |
1954 | Specifies a GLX rendering context. | |
1955 | ||
1956 | ATTRIBUTE | |
c7b31271 DH |
1957 | Specifies that a context parameter should be retrieved. Must be |
1958 | one of `GLX_FBCONFIG_ID', `GLX_RENDER_TYPE', or `GLX_SCREEN'. | |
3c9b6116 AW |
1959 | |
1960 | VALUE | |
1961 | Contains the return value for ATTRIBUTE. | |
1962 | ||
1963 | `glXQueryContext' sets VALUE to the value of ATTRIBUTE with respect to | |
c7b31271 | 1964 | CTX. ATTRIBUTE may be one of the following: |
3c9b6116 AW |
1965 | |
1966 | `GLX_FBCONFIG_ID' | |
1967 | Returns the XID of the GLXFBConfig associated with CTX. | |
1968 | ||
1969 | `GLX_RENDER_TYPE' | |
1970 | Returns the rendering type supported by CTX. | |
1971 | ||
1972 | `GLX_SCREEN' | |
1973 | Returns the screen number associated with CTX. | |
1974 | ||
1975 | `Success' is returned unless ATTRIBUTE is not a valid GLX context | |
1976 | attribute, in which case `GLX_BAD_ATTRIBUTE' is returned. | |
1977 | ||
1978 | This call may cause a round-trip to the server. | |
1979 | ||
1980 | `GLXBadContext' is generated if CTX does not refer to a valid context.") | |
8925f36f | 1981 | |
25072f02 | 1982 | (define-glx-procedures |
bb894c9d | 1983 | ((glXQueryDrawable |
00239761 | 1984 | (dpy Display-*) |
bb894c9d AW |
1985 | (draw GLXDrawable) |
1986 | (attribute int) | |
00239761 | 1987 | (value unsigned-int-*) |
bb894c9d AW |
1988 | -> |
1989 | int)) | |
3c9b6116 AW |
1990 | "Returns an attribute assoicated with a GLX drawable. |
1991 | ||
1992 | DPY | |
1993 | Specifies the connection to the X server. | |
1994 | ||
1995 | DRAW | |
1996 | Specifies the GLX drawable to be queried. | |
1997 | ||
1998 | ATTRIBUTE | |
c7b31271 DH |
1999 | Specifies the attribute to be returned. Must be one of |
2000 | `GLX_WIDTH', `GLX_HEIGHT', `GLX_PRESERVED_CONTENTS', | |
2001 | `GLX_LARGEST_PBUFFER', or `GLX_FBCONFIG_ID'. | |
3c9b6116 AW |
2002 | |
2003 | VALUE | |
2004 | Contains the return value for ATTRIBUTE. | |
2005 | ||
2006 | `glXQueryDrawable' sets VALUE to the value of ATTRIBUTE with respect to | |
2007 | the GLXDrawable DRAW. | |
2008 | ||
2009 | ATTRIBUTE may be one of the following: | |
2010 | ||
2011 | `GLX_WIDTH' | |
2012 | Returns the width of CTX. | |
2013 | ||
2014 | `GLX_HEIGHT' | |
2015 | Returns the height of CTX. | |
2016 | ||
2017 | `GLX_PRESERVED_CONTENTS' | |
2018 | Returns `True' if the contents of a GLXPbuffer are preserved when a | |
2019 | resource conflict occurs; `False' otherwise. | |
2020 | ||
2021 | `GLX_LARGEST_PBUFFER' | |
2022 | Returns the value set when `glXCreatePbuffer' was called to create | |
c7b31271 | 2023 | the GLXPbuffer. If `False' is returned, then the call to |
3c9b6116 AW |
2024 | `glXCreatePbuffer' will fail to create a GLXPbuffer if the |
2025 | requested size is larger than the implementation maximum or | |
c7b31271 | 2026 | available resources. If `True' is returned, a GLXPbuffer of the |
3c9b6116 AW |
2027 | maximum availble size (if less than the requested width and height) |
2028 | is created. | |
2029 | ||
2030 | `GLX_FBCONFIG_ID' | |
2031 | Returns the XID for DRAW. | |
2032 | ||
2033 | If DRAW is a GLXWindow or GLXPixmap and ATTRIBUTE is set to | |
2034 | `GLX_PRESERVED_CONTENTS' or `GLX_LARGETST_PBUFFER', the contents of | |
c7b31271 | 2035 | VALUE are undefined. If ATTRIBUTE is not one of the attributes listed |
3c9b6116 AW |
2036 | above, the contents of VALUE are unedfined. |
2037 | ||
2038 | A `GLXBadDrawable' is generated if DRAW is not a valid GLXDrawable.") | |
8925f36f | 2039 | |
25072f02 | 2040 | (define-glx-procedures |
bb894c9d | 2041 | ((glXQueryExtensionsString |
00239761 | 2042 | (dpy Display-*) |
bb894c9d AW |
2043 | (screen int) |
2044 | -> | |
00239761 | 2045 | const-char-*)) |
3c9b6116 AW |
2046 | "Return list of supported extensions. |
2047 | ||
2048 | DPY | |
2049 | Specifies the connection to the X server. | |
2050 | ||
2051 | SCREEN | |
2052 | Specifies the screen number. | |
2053 | ||
2054 | `glXQueryExtensionsString' returns a pointer to a string describing | |
c7b31271 | 2055 | which GLX extensions are supported on the connection. The string is |
3c9b6116 AW |
2056 | null-terminated and contains a space-separated list of extension names. |
2057 | (The extension names themselves never contain spaces.) If there are no | |
2058 | extensions to GLX, then the empty string is returned.") | |
8925f36f | 2059 | |
25072f02 | 2060 | (define-glx-procedures |
bb894c9d | 2061 | ((glXQueryExtension |
00239761 AW |
2062 | (dpy Display-*) |
2063 | (errorBase int-*) | |
2064 | (eventBase int-*) | |
bb894c9d AW |
2065 | -> |
2066 | Bool)) | |
3c9b6116 AW |
2067 | "Indicate whether the GLX extension is supported. |
2068 | ||
2069 | DPY | |
2070 | Specifies the connection to the X server. | |
2071 | ||
2072 | ERRORBASE | |
2073 | Returns the base error code of the GLX server extension. | |
2074 | ||
2075 | EVENTBASE | |
2076 | Returns the base event code of the GLX server extension. | |
2077 | ||
2078 | `glXQueryExtension' returns `True' if the X server of connection DPY | |
c7b31271 | 2079 | supports the GLX extension, `False' otherwise. If `True' is returned, |
3c9b6116 | 2080 | then ERRORBASE and EVENTBASE return the error base and event base of the |
c7b31271 DH |
2081 | GLX extension. These values should be added to the constant error and |
2082 | event values to determine the actual event or error values. Otherwise, | |
3c9b6116 AW |
2083 | ERRORBASE and EVENTBASE are unchanged. |
2084 | ||
2085 | ERRORBASE and EVENTBASE do not return values if they are specified as | |
2086 | `NULL'.") | |
8925f36f | 2087 | |
25072f02 | 2088 | (define-glx-procedures |
bb894c9d | 2089 | ((glXQueryServerString |
00239761 | 2090 | (dpy Display-*) |
bb894c9d AW |
2091 | (screen int) |
2092 | (name int) | |
2093 | -> | |
00239761 | 2094 | const-char-*)) |
3c9b6116 AW |
2095 | "Return string describing the server. |
2096 | ||
2097 | DPY | |
2098 | Specifies the connection to the X server. | |
2099 | ||
2100 | SCREEN | |
2101 | Specifies the screen number. | |
2102 | ||
2103 | NAME | |
2104 | Specifies which string is returned: one of `GLX_VENDOR', | |
2105 | `GLX_VERSION', or `GLX_EXTENSIONS'. | |
2106 | ||
2107 | `glXQueryServerString' returns a pointer to a static, null-terminated | |
c7b31271 | 2108 | string describing some aspect of the server's GLX extension. The |
3c9b6116 | 2109 | possible values for NAME and the format of the strings is the same as |
c7b31271 | 2110 | for `glXGetClientString'. If NAME is not set to a recognized value, |
3c9b6116 | 2111 | `NULL' is returned.") |
8925f36f | 2112 | |
25072f02 | 2113 | (define-glx-procedures |
bb894c9d | 2114 | ((glXQueryVersion |
00239761 AW |
2115 | (dpy Display-*) |
2116 | (major int-*) | |
2117 | (minor int-*) | |
bb894c9d AW |
2118 | -> |
2119 | Bool)) | |
3c9b6116 AW |
2120 | "Return the version numbers of the GLX extension. |
2121 | ||
2122 | DPY | |
2123 | Specifies the connection to the X server. | |
2124 | ||
2125 | MAJOR | |
2126 | Returns the major version number of the GLX server extension. | |
2127 | ||
2128 | MINOR | |
2129 | Returns the minor version number of the GLX server extension. | |
2130 | ||
2131 | `glXQueryVersion' returns the major and minor version numbers of the GLX | |
2132 | extension implemented by the server associated with connection DPY. | |
2133 | Implementations with the same major version number are upward | |
2134 | compatible, meaning that the implementation with the higher minor number | |
2135 | is a superset of the version with the lower minor number. | |
2136 | ||
2137 | MAJOR and MINOR do not return values if they are specified as `NULL'. | |
2138 | ||
2139 | `glXQueryVersion' returns `False' if it fails, `True' otherwise. | |
2140 | ||
2141 | MAJOR and MINOR are not updated when `False' is returned.") | |
8925f36f | 2142 | |
25072f02 | 2143 | (define-glx-procedures |
bb894c9d | 2144 | ((glXSelectEvent |
00239761 | 2145 | (dpy Display-*) |
bb894c9d | 2146 | (draw GLXDrawable) |
00239761 | 2147 | (event_mask unsigned-long) |
bb894c9d AW |
2148 | -> |
2149 | void)) | |
3c9b6116 AW |
2150 | "Select GLX events for a window or a GLX pixel buffer. |
2151 | ||
2152 | DPY | |
2153 | Specifies the connection to the X server. | |
2154 | ||
2155 | DRAW | |
c7b31271 | 2156 | Specifies a GLX drawable. Must be a GLX pixel buffer or a window. |
3c9b6116 AW |
2157 | |
2158 | EVENT_MASK | |
2159 | Specifies the events to be returned for DRAW. | |
2160 | ||
2161 | `glXSelectEvent' sets the GLX event mask for a GLX pixel buffer or a | |
c7b31271 DH |
2162 | window. Calling `glXSelectEvent' overrides any previous event mask that |
2163 | was set by the client for DRAW. Note that it does not affect the event | |
3c9b6116 AW |
2164 | masks that other clients may have specified for DRAW since each client |
2165 | rendering to DRAW has a separate event mask for it. | |
2166 | ||
2167 | Currently, only one GLX event, `GLX_PBUFFER_CLOBBER_MASK', can be | |
c7b31271 | 2168 | selected. The following data is returned to the client when a |
3c9b6116 AW |
2169 | `GLX_PBUFFER_CLOBBER_MASK' event occurs: |
2170 | ||
2171 | typedef struct { | |
2172 | ||
2173 | int EVENT_TYPE; | |
2174 | /* GLX_DAMAGED or GLX_SAVED */ | |
2175 | ||
2176 | int DRAW_TYPE; | |
2177 | /* GLX_WINDOW or GLX_PBUFFER */ | |
2178 | ||
2179 | unsigned long SERIAL; | |
2180 | /* # of last request processed by server */ | |
2181 | ||
2182 | Bool SEND_EVENT; | |
2183 | /* true if this came for SendEvent request */ | |
2184 | ||
2185 | Display *DISPLAY; | |
2186 | /* display the event was read from */ | |
2187 | ||
2188 | GLXDrawable DRAWABLE; | |
c7b31271 | 2189 | /* i.d. of Drawable */ |
3c9b6116 AW |
2190 | |
2191 | unsigned int BUFFER_MASK; | |
2192 | /* mask indicating affected buffers */ | |
2193 | ||
2194 | int X, Y; | |
2195 | ||
2196 | ||
2197 | int WIDTH, HEIGHT; | |
2198 | ||
2199 | ||
2200 | int COUNT; | |
2201 | /* if nonzero, at least this many more */ | |
2202 | ||
2203 | } GLXPbufferClobberEvent; The valid bit masks used in BUFFER_MASK are: | |
2204 | ||
2205 | ||
2206 | ||
2207 | *Bitmask* | |
2208 | *Corresponding Buffer* | |
2209 | ||
2210 | `GLX_FRONT_LEFT_BUFFER_BIT' | |
2211 | Front left color buffer | |
2212 | ||
2213 | `GLX_FRONT_RIGHT_BUFFER_BIT' | |
2214 | Front right color buffer | |
2215 | ||
2216 | `GLX_BACK_LEFT_BUFFER_BIT' | |
2217 | Back left color buffer | |
2218 | ||
2219 | `GLX_BACK_RIGHT_BUFFER_BIT' | |
2220 | Back right color buffer | |
2221 | ||
2222 | `GLX_AUX_BUFFERS_BIT' | |
2223 | Auxiliary buffer | |
2224 | ||
2225 | `GLX_DEPTH_BUFFER_BIT' | |
2226 | Depth buffer | |
2227 | ||
2228 | `GLX_STENCIL_BUFFER_BIT' | |
2229 | Stencil buffer | |
2230 | ||
2231 | `GLX_ACCUM_BUFFER_BIT' | |
2232 | Accumulation buffer | |
2233 | ||
2234 | A single X server operation can cause several buffer clobber events to | |
c7b31271 DH |
2235 | be sent. (e.g., a single GLX pixel buffer may be damaged and cause |
2236 | multiple buffer clobber events to be generated). Each event specifies | |
3c9b6116 | 2237 | one region of the GLX drawable that was affected by the X Server |
c7b31271 DH |
2238 | operation. The BUFFER_MASK field indicates which color buffers and |
2239 | ancillary buffers were affected. All the buffer clobber events | |
2240 | generated by a single X server action are guaranteed to be contiguous in | |
2241 | the event queue. The conditions under which this event is generated and | |
2242 | the EVENT_TYPE varies, depending on the type of the GLX drawable. | |
3c9b6116 AW |
2243 | |
2244 | When the `GLX_AUX_BUFFERS_BIT' is set in BUFFER_MASK, then AUX_BUFFER is | |
c7b31271 | 2245 | set to indicate which buffer was affected. If more than one aux buffer |
3c9b6116 | 2246 | was affected, then additional events are generated as part of the same |
c7b31271 | 2247 | contiguous event group. Each additional event will have only the |
3c9b6116 | 2248 | `GLX_AUX_BUFFERS_BIT' set in BUFFER_MASK, and the AUX_BUFFER field will |
c7b31271 | 2249 | be set appropriately. For nonstereo drawables, |
3c9b6116 AW |
2250 | `GLX_FRONT_LEFT_BUFFER_BIT' and `GLX_BACK_LEFT_BUFFER_BIT' are used to |
2251 | specify the front and back color buffers. | |
2252 | ||
2253 | For preserved GLX pixel buffers, a buffer clobber event with type | |
2254 | `GLX_SAVED' is generated whenever the contents of the GLX pixel buffer | |
c7b31271 DH |
2255 | is moved out of offscreen memory. The event(s) describes which portions |
2256 | of the GLX pixel buffer were affected. Clients who receive many buffer | |
3c9b6116 AW |
2257 | clobber events, referring to different save actions, should consider |
2258 | freeing the GLX pixel buffer resource in order to prevent the system | |
2259 | from thrashing due to insufficient resources. | |
2260 | ||
2261 | For an unpreserved GLXPbuffer, a buffer clobber event, with type | |
2262 | `GLX_DAMAGED', is generated whenever a portion of the GLX pixel buffer | |
c7b31271 | 2263 | becomes invalid. The client may wish to regenerate the invalid portions |
3c9b6116 AW |
2264 | of the GLX pixel buffer. |
2265 | ||
2266 | For Windows, buffer clobber events, with type `GLX_SAVED', occur | |
2267 | whenever an ancillary buffer, associated with the window, gets clobbered | |
c7b31271 | 2268 | or moved out of off-screen memory. The event contains information |
3c9b6116 AW |
2269 | indicating which color buffers and ancillary buffers\\(emand which |
2270 | portions of those buffers\\(emwere affected. | |
2271 | ||
2272 | `GLXBadDrawable' is generated if DRAW is not a valid window or a valid | |
2273 | GLX pixel buffer.") | |
8925f36f | 2274 | |
25072f02 | 2275 | (define-glx-procedures |
bb894c9d | 2276 | ((glXSwapBuffers |
00239761 | 2277 | (dpy Display-*) |
bb894c9d AW |
2278 | (drawable GLXDrawable) |
2279 | -> | |
2280 | void)) | |
3c9b6116 AW |
2281 | "Exchange front and back buffers. |
2282 | ||
2283 | DPY | |
2284 | Specifies the connection to the X server. | |
2285 | ||
2286 | DRAWABLE | |
2287 | Specifies the drawable whose buffers are to be swapped. | |
2288 | ||
2289 | `glXSwapBuffers' promotes the contents of the back buffer of DRAWABLE to | |
c7b31271 DH |
2290 | become the contents of the front buffer of DRAWABLE. The contents of |
2291 | the back buffer then become undefined. The update typically takes place | |
3c9b6116 AW |
2292 | during the vertical retrace of the monitor, rather than immediately |
2293 | after `glXSwapBuffers' is called. | |
2294 | ||
2295 | `glXSwapBuffers' performs an implicit `glFlush' before it returns. | |
2296 | Subsequent OpenGL commands may be issued immediately after calling | |
2297 | `glXSwapBuffers', but are not executed until the buffer exchange is | |
2298 | completed. | |
2299 | ||
2300 | If DRAWABLE was not created with respect to a double-buffered visual, | |
2301 | `glXSwapBuffers' has no effect, and no error is generated. | |
2302 | ||
2303 | `GLXBadDrawable' is generated if DRAWABLE is not a valid GLX drawable. | |
2304 | ||
2305 | `GLXBadCurrentWindow' is generated if DPY and DRAWABLE are respectively | |
2306 | the display and drawable associated with the current context of the | |
2307 | calling thread, and DRAWABLE identifies a window that is no longer | |
2308 | valid.") | |
8925f36f | 2309 | |
25072f02 | 2310 | (define-glx-procedures |
bb894c9d AW |
2311 | ((glXUseXFont |
2312 | (font Font) | |
2313 | (first int) | |
2314 | (count int) | |
2315 | (listBase int) | |
2316 | -> | |
2317 | void)) | |
3c9b6116 AW |
2318 | "Create bitmap display lists from an X font. |
2319 | ||
2320 | FONT | |
2321 | Specifies the font from which character glyphs are to be taken. | |
2322 | ||
2323 | FIRST | |
2324 | Specifies the index of the first glyph to be taken. | |
2325 | ||
2326 | COUNT | |
2327 | Specifies the number of glyphs to be taken. | |
2328 | ||
2329 | LISTBASE | |
2330 | Specifies the index of the first display list to be generated. | |
2331 | ||
2332 | `glXUseXFont' generates COUNT display lists, named LISTBASE through | |
c7b31271 | 2333 | LISTBASE+COUNT-1 , each containing a single `glBitmap' command. The |
3c9b6116 | 2334 | parameters of the `glBitmap' command of display list LISTBASE+I are |
c7b31271 | 2335 | derived from glyph FIRST+I . Bitmap parameters XORIG , YORIG , WIDTH , |
3c9b6116 | 2336 | and HEIGHT are computed from font metrics as DESCENT-1 , -LBEARING , |
c7b31271 DH |
2337 | RBEARING-LBEARING , and ASCENT+DESCENT , respectively. XMOVE is taken |
2338 | from the glyph's WIDTH metric, and YMOVE is set to zero. Finally, the | |
3c9b6116 AW |
2339 | glyph's image is converted to the appropriate format for `glBitmap'. |
2340 | ||
2341 | Using `glXUseXFont' may be more efficient than accessing the X font and | |
2342 | generating the display lists explicitly, both because the display lists | |
2343 | are created on the server without requiring a round trip of the glyph | |
2344 | data, and because the server may choose to delay the creation of each | |
2345 | bitmap until it is accessed. | |
2346 | ||
8925f36f | 2347 | Empty display lists are created for all glyphs that are requested and |
c7b31271 DH |
2348 | are not defined in FONT. `glXUseXFont' is ignored if there is no |
2349 | current GLX context. | |
3c9b6116 AW |
2350 | |
2351 | `BadFont' is generated if FONT is not a valid font. | |
2352 | ||
2353 | `GLXBadContextState' is generated if the current GLX context is in | |
2354 | display-list construction mode. | |
2355 | ||
2356 | `GLXBadCurrentWindow' is generated if the drawable associated with the | |
2357 | current context of the calling thread is a window, and that window is no | |
2358 | longer valid.") | |
8925f36f | 2359 | |
25072f02 | 2360 | (define-glx-procedures |
bb894c9d | 2361 | ((glXWaitGL -> void)) |
3c9b6116 AW |
2362 | "Complete GL execution prior to subsequent X calls. |
2363 | ||
2364 | GL rendering calls made prior to `glXWaitGL' are guaranteed to be | |
c7b31271 | 2365 | executed before X rendering calls made after `glXWaitGL'. Although this |
3c9b6116 AW |
2366 | same result can be achieved using `glFinish', `glXWaitGL' does not |
2367 | require a round trip to the server, and it is therefore more efficient | |
2368 | in cases where client and server are on separate machines. | |
2369 | ||
2370 | `glXWaitGL' is ignored if there is no current GLX context. | |
2371 | ||
2372 | `GLXBadCurrentWindow' is generated if the drawable associated with the | |
2373 | current context of the calling thread is a window, and that window is no | |
2374 | longer valid.") | |
8925f36f | 2375 | |
25072f02 | 2376 | (define-glx-procedures |
bb894c9d | 2377 | ((glXWaitX -> void)) |
3c9b6116 AW |
2378 | "Complete X execution prior to subsequent GL calls. |
2379 | ||
2380 | X rendering calls made prior to `glXWaitX' are guaranteed to be executed | |
c7b31271 | 2381 | before GL rendering calls made after `glXWaitX'. Although the same |
3c9b6116 AW |
2382 | result can be achieved using `XSync', `glXWaitX' does not require a |
2383 | round trip to the server, and it is therefore more efficient in cases | |
2384 | where client and server are on separate machines. | |
2385 | ||
2386 | `glXWaitX' is ignored if there is no current GLX context. | |
2387 | ||
2388 | `GLXBadCurrentWindow' is generated if the drawable associated with the | |
2389 | current context of the calling thread is a window, and that window is no | |
2390 | longer valid.") | |
8925f36f | 2391 |