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