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