From 704372ea2a005d4b57ad89032fd4e5e2511bac57 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 7 Feb 2013 18:42:07 +0100 Subject: [PATCH] generate glx enums * Makefile.am (update-enums): Add update-enums target. Add enums files to build and dist. * maint/update-enumerations (main): Also generate glx enums. * figl/parse.scm: Add more hacks to be able to parse glxenums.spec. * doc/low-level-glx-enums.texi: * figl/glx/enums.scm: New generated files. --- Makefile.am | 8 +- doc/figl.texi | 6 + doc/low-level-glx-enums.texi | 298 ++++++++++++++++++++++++++++ figl/glx/enums.scm | 364 +++++++++++++++++++++++++++++++++++ figl/parse.scm | 12 +- maint/update-enumerations | 3 +- 6 files changed, 686 insertions(+), 5 deletions(-) create mode 100644 doc/low-level-glx-enums.texi create mode 100644 figl/glx/enums.scm diff --git a/Makefile.am b/Makefile.am index 8e870aa..40d7ca9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,6 +22,7 @@ SOURCES = \ figl/glx/types.scm \ figl/glx/runtime.scm \ figl/glx/low-level.scm \ + figl/glx/enums.scm \ figl/glx.scm \ \ figl/glut/runtime.scm \ @@ -31,13 +32,18 @@ SOURCES = \ update: figl/parse.go $(top_builddir)/env $(GUILE) $(top_srcdir)/maint/update-low-level-bindings +update-enums: figl/parse.go + $(top_builddir)/env $(GUILE) $(top_srcdir)/maint/update-enumerations + EXTRA_DIST += env.in COPYING COPYING.LESSER info_TEXINFOS = doc/figl.texi figl_TEXINFOS = \ doc/low-level-gl.texi \ doc/low-level-glu.texi \ - doc/low-level-glx.texi + doc/low-level-glx.texi \ + doc/low-level-gl-enums.texi \ + doc/low-level-glx-enums.texi TESTS = \ tests/basic.test diff --git a/doc/figl.texi b/doc/figl.texi index 2623de7..1792ab4 100644 --- a/doc/figl.texi +++ b/doc/figl.texi @@ -370,6 +370,7 @@ extension at runtime with @code{(glGetString GL_EXTENSIONS)}. @menu * Low-Level GLX:: Primitive interface to ``glX'' functionality. +* GLX Enumerations:: GLX enumerated values. @end menu @@ -378,6 +379,11 @@ extension at runtime with @code{(glGetString GL_EXTENSIONS)}. @include low-level-glx.texi +@node GLX Enumerations +@section GLX Enumerations +@include low-level-glx-enums.texi + + @node GLUT @chapter GLUT diff --git a/doc/low-level-glx-enums.texi b/doc/low-level-glx-enums.texi new file mode 100644 index 0000000..b1e77dd --- /dev/null +++ b/doc/low-level-glx-enums.texi @@ -0,0 +1,298 @@ + +@c %start of fragment + +The functions from this section may be had by loading the module: + +@example +(use-modules (figl glx enums) +@end example + +@defmac glx-string-name enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{vendor}, @code{version}, @code{extensions}. + +@end defmac + +@defmac glx-error-code enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{bad-screen}, @code{bad-attribute}, @code{no-extension}, +@code{bad-visual}, @code{bad-context}, @code{bad-value}, +@code{bad-enum}, @code{bad-hyperpipe-config-sgix}, +@code{bad-hyperpipe-sgix}. + +@end defmac + +@defmac glx-drawable-type-mask enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{window-bit}, @code{pixmap-bit}, @code{pbuffer-bit}, +@code{window-bit-sgix}, @code{pixmap-bit-sgix}, @code{pbuffer-bit-sgix}. + +@end defmac + +@defmac glx-render-type-mask enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{rgba-bit}, @code{color-index-bit}, @code{rgba-bit-sgix}, +@code{color-index-bit-sgix}, @code{rgba-float-bit-arb}, +@code{rgba-unsigned-float-bit-ext}. + +@end defmac + +@defmac glx-sync-type enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{sync-frame-sgix}, @code{sync-swap-sgix}. + +@end defmac + +@defmac glx-event-mask enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{pbuffer-clobber-mask}, @code{buffer-clobber-mask-sgix}, +@code{buffer-swap-complete-intel-mask}. + +@end defmac + +@defmac glx-pbuffer-clobber-mask enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{front-left-buffer-bit}, @code{front-right-buffer-bit}, +@code{back-left-buffer-bit}, @code{back-right-buffer-bit}, +@code{aux-buffers-bit}, @code{depth-buffer-bit}, +@code{stencil-buffer-bit}, @code{accum-buffer-bit}, +@code{front-left-buffer-bit-sgix}, @code{front-right-buffer-bit-sgix}, +@code{back-left-buffer-bit-sgix}, @code{back-right-buffer-bit-sgix}, +@code{aux-buffers-bit-sgix}, @code{depth-buffer-bit-sgix}, +@code{stencil-buffer-bit-sgix}, @code{accum-buffer-bit-sgix}, +@code{sample-buffers-bit-sgix}. + +@end defmac + +@defmac glx-hyperpipe-type-mask enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{hyperpipe-display-pipe-sgix}, @code{hyperpipe-render-pipe-sgix}. + +@end defmac + +@defmac glx-hyperpipe-attrib enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{pipe-rect-sgix}, @code{pipe-rect-limits-sgix}, +@code{hyperpipe-stereo-sgix}, @code{hyperpipe-pixel-average-sgix}. + +@end defmac + +@defmac glx-hyperpipe-misc enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{hyperpipe-pipe-name-length-sgix}. + +@end defmac + +@defmac glx-bind-to-texture-target-mask enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{texture-1d-bit-ext}, @code{texture-2d-bit-ext}, +@code{texture-rectangle-bit-ext}. + +@end defmac + +@defmac glx-context-flags enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{context-debug-bit-arb}, @code{context-forward-compatible-bit-arb}, +@code{context-robust-access-bit-arb}, +@code{context-reset-isolation-bit-arb}. + +@end defmac + +@defmac glx-context-profile-mask enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{context-core-profile-bit-arb}, +@code{context-compatibility-profile-bit-arb}, +@code{context-es-profile-bit-ext}, @code{context-es2-profile-bit-ext}. + +@end defmac + +@defmac glx-attribute enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{use-gl}, @code{buffer-size}, @code{level}, @code{rgba}, +@code{doublebuffer}, @code{stereo}, @code{aux-buffers}, @code{red-size}, +@code{green-size}, @code{blue-size}, @code{alpha-size}, +@code{depth-size}, @code{stencil-size}, @code{accum-red-size}, +@code{accum-green-size}, @code{accum-blue-size}, +@code{accum-alpha-size}, @code{config-caveat}, @code{x-visual-type}, +@code{transparent-type}, @code{transparent-index-value}, +@code{transparent-red-value}, @code{transparent-green-value}, +@code{transparent-blue-value}, @code{transparent-alpha-value}, +@code{dont-care}, @code{none}, @code{slow-config}, @code{true-color}, +@code{direct-color}, @code{pseudo-color}, @code{static-color}, +@code{gray-scale}, @code{static-gray}, @code{transparent-rgb}, +@code{transparent-index}, @code{visual-id}, @code{screen}, +@code{non-conformant-config}, @code{drawable-type}, @code{render-type}, +@code{x-renderable}, @code{fbconfig-id}, @code{rgba-type}, +@code{color-index-type}, @code{max-pbuffer-width}, +@code{max-pbuffer-height}, @code{max-pbuffer-pixels}, +@code{preserved-contents}, @code{largest-pbuffer}, @code{width}, +@code{height}, @code{event-mask}, @code{damaged}, @code{saved}, +@code{window}, @code{pbuffer}, @code{pbuffer-height}, +@code{pbuffer-width}, @code{visual-caveat-ext}, +@code{x-visual-type-ext}, @code{transparent-type-ext}, +@code{transparent-index-value-ext}, @code{transparent-red-value-ext}, +@code{transparent-green-value-ext}, @code{transparent-blue-value-ext}, +@code{transparent-alpha-value-ext}, @code{none-ext}, +@code{slow-visual-ext}, @code{true-color-ext}, @code{direct-color-ext}, +@code{pseudo-color-ext}, @code{static-color-ext}, @code{gray-scale-ext}, +@code{static-gray-ext}, @code{transparent-rgb-ext}, +@code{transparent-index-ext}, @code{share-context-ext}, +@code{visual-id-ext}, @code{screen-ext}, +@code{non-conformant-visual-ext}, @code{drawable-type-sgix}, +@code{render-type-sgix}, @code{x-renderable-sgix}, +@code{fbconfig-id-sgix}, @code{rgba-type-sgix}, +@code{color-index-type-sgix}, @code{max-pbuffer-width-sgix}, +@code{max-pbuffer-height-sgix}, @code{max-pbuffer-pixels-sgix}, +@code{optimal-pbuffer-width-sgix}, @code{optimal-pbuffer-height-sgix}, +@code{preserved-contents-sgix}, @code{largest-pbuffer-sgix}, +@code{width-sgix}, @code{height-sgix}, @code{event-mask-sgix}, +@code{damaged-sgix}, @code{saved-sgix}, @code{window-sgix}, +@code{pbuffer-sgix}, @code{digital-media-pbuffer-sgix}, +@code{blended-rgba-sgis}, @code{multisample-sub-rect-width-sgis}, +@code{multisample-sub-rect-height-sgis}, +@code{visual-select-group-sgix}, @code{hyperpipe-id-sgix}, +@code{sample-buffers-sgis}, @code{samples-sgis}, +@code{sample-buffers-arb}, @code{samples-arb}, @code{sample-buffers}, +@code{samples}, @code{coverage-samples-nv}, +@code{context-major-version-arb}, @code{context-minor-version-arb}, +@code{context-flags-arb}, +@code{context-allow-buffer-byte-order-mismatch-arb}, +@code{float-components-nv}, @code{rgba-unsigned-float-type-ext}, +@code{framebuffer-srgb-capable-arb}, +@code{framebuffer-srgb-capable-ext}, @code{color-samples-nv}, +@code{rgba-float-type-arb}, @code{video-out-color-nv}, +@code{video-out-alpha-nv}, @code{video-out-depth-nv}, +@code{video-out-color-and-alpha-nv}, +@code{video-out-color-and-depth-nv}, @code{video-out-frame-nv}, +@code{video-out-field-1-nv}, @code{video-out-field-2-nv}, +@code{video-out-stacked-fields-1-2-nv}, +@code{video-out-stacked-fields-2-1-nv}, @code{device-id-nv}, +@code{unique-id-nv}, @code{num-video-capture-slots-nv}, +@code{bind-to-texture-rgb-ext}, @code{bind-to-texture-rgba-ext}, +@code{bind-to-mipmap-texture-ext}, @code{bind-to-texture-targets-ext}, +@code{y-inverted-ext}, @code{texture-format-ext}, +@code{texture-target-ext}, @code{mipmap-texture-ext}, +@code{texture-format-none-ext}, @code{texture-format-rgb-ext}, +@code{texture-format-rgba-ext}, @code{texture-1d-ext}, +@code{texture-2d-ext}, @code{texture-rectangle-ext}, +@code{front-left-ext}, @code{front-right-ext}, @code{back-left-ext}, +@code{back-right-ext}, @code{front-ext}, @code{back-ext}, +@code{aux0-ext}, @code{aux1-ext}, @code{aux2-ext}, @code{aux3-ext}, +@code{aux4-ext}, @code{aux5-ext}, @code{aux6-ext}, @code{aux7-ext}, +@code{aux8-ext}, @code{aux9-ext}. + +@end defmac + +@defmac nv-present-video enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{num-video-slots-nv}. + +@end defmac + +@defmac ext-swap-control enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{swap-interval-ext}, @code{max-swap-interval-ext}. + +@end defmac + +@defmac ext-swap-control-tear enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{late-swaps-tear-ext}. + +@end defmac + +@defmac ext-buffer-age enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{back-buffer-age-ext}. + +@end defmac + +@defmac glx-amd-gpu-association enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{gpu-vendor-amd}, @code{gpu-renderer-string-amd}, +@code{gpu-opengl-version-string-amd}, +@code{gpu-fastest-target-gpus-amd}, @code{gpu-ram-amd}, +@code{gpu-clock-amd}, @code{gpu-num-pipes-amd}, @code{gpu-num-simd-amd}, +@code{gpu-num-rb-amd}, @code{gpu-num-spi-amd}. + +@end defmac + +@defmac glx-arb-create-context-robustness enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{lose-context-on-reset-arb}, +@code{context-reset-notification-strategy-arb}, +@code{no-reset-notification-arb}. + +@end defmac + +@defmac arb-create-context-profile enum +Enumerated value. The symbolic @var{enum}argument is replaced with its +corresponding numeric value at compile-time. The symbolic arguments +known to this enumerated value form are: + +@code{context-profile-mask-arb}. + +@end defmac + + +@c %end of fragment diff --git a/figl/glx/enums.scm b/figl/glx/enums.scm new file mode 100644 index 0000000..f68ed1d --- /dev/null +++ b/figl/glx/enums.scm @@ -0,0 +1,364 @@ +;;; figl -*- mode: scheme; coding: utf-8 -*- +;;; Copyright (C) 2013 Andy Wingo +;;; +;;; Figl is free software: you can redistribute it and/or modify it +;;; under the terms of the GNU Lesser General Public License as +;;; published by the Free Software Foundation, either version 3 of the +;;; License, or (at your option) any later version. +;;; +;;; Figl is distributed in the hope that it will be useful, but WITHOUT +;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +;;; Public License for more details. +;;; +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with this program. If not, see +;;; . +;;; +;;; Derived from the API specifications at www.opengl.org/registry/api/. +;;; +;;; Automatically generated; you probably don't want to edit this. To +;;; update, run "make update-enums" in the top-level build tree. +;;; + +(define-module + (figl glx enums) + #:use-module + (figl runtime) + #:export + (glx-string-name + glx-error-code + glx-drawable-type-mask + glx-render-type-mask + glx-sync-type + glx-event-mask + glx-pbuffer-clobber-mask + glx-hyperpipe-type-mask + glx-hyperpipe-attrib + glx-hyperpipe-misc + glx-bind-to-texture-target-mask + glx-context-flags + glx-context-profile-mask + glx-attribute + nv-present-video + ext-swap-control + ext-swap-control-tear + ext-buffer-age + glx-amd-gpu-association + glx-arb-create-context-robustness + arb-create-context-profile)) + +(define-enumeration + glx-string-name + (vendor 1) + (version 2) + (extensions 3)) + +(define-enumeration + glx-error-code + (bad-screen 1) + (bad-attribute 2) + (no-extension 3) + (bad-visual 4) + (bad-context 5) + (bad-value 6) + (bad-enum 7) + (bad-hyperpipe-config-sgix 91) + (bad-hyperpipe-sgix 92)) + +(define-enumeration + glx-drawable-type-mask + (window-bit 1) + (pixmap-bit 2) + (pbuffer-bit 4) + (window-bit-sgix 1) + (pixmap-bit-sgix 2) + (pbuffer-bit-sgix 4)) + +(define-enumeration + glx-render-type-mask + (rgba-bit 1) + (color-index-bit 2) + (rgba-bit-sgix 1) + (color-index-bit-sgix 2) + (rgba-float-bit-arb 4) + (rgba-unsigned-float-bit-ext 8)) + +(define-enumeration + glx-sync-type + (sync-frame-sgix 0) + (sync-swap-sgix 1)) + +(define-enumeration + glx-event-mask + (pbuffer-clobber-mask 134217728) + (buffer-clobber-mask-sgix 134217728) + (buffer-swap-complete-intel-mask 67108864)) + +(define-enumeration + glx-pbuffer-clobber-mask + (front-left-buffer-bit 1) + (front-right-buffer-bit 2) + (back-left-buffer-bit 4) + (back-right-buffer-bit 8) + (aux-buffers-bit 16) + (depth-buffer-bit 32) + (stencil-buffer-bit 64) + (accum-buffer-bit 128) + (front-left-buffer-bit-sgix 1) + (front-right-buffer-bit-sgix 2) + (back-left-buffer-bit-sgix 4) + (back-right-buffer-bit-sgix 8) + (aux-buffers-bit-sgix 16) + (depth-buffer-bit-sgix 32) + (stencil-buffer-bit-sgix 64) + (accum-buffer-bit-sgix 128) + (sample-buffers-bit-sgix 256)) + +(define-enumeration + glx-hyperpipe-type-mask + (hyperpipe-display-pipe-sgix 1) + (hyperpipe-render-pipe-sgix 2)) + +(define-enumeration + glx-hyperpipe-attrib + (pipe-rect-sgix 1) + (pipe-rect-limits-sgix 2) + (hyperpipe-stereo-sgix 3) + (hyperpipe-pixel-average-sgix 4)) + +(define-enumeration + glx-hyperpipe-misc + (hyperpipe-pipe-name-length-sgix 80)) + +(define-enumeration + glx-bind-to-texture-target-mask + (texture-1d-bit-ext 1) + (texture-2d-bit-ext 2) + (texture-rectangle-bit-ext 4)) + +(define-enumeration + glx-context-flags + (context-debug-bit-arb 1) + (context-forward-compatible-bit-arb 2) + (context-robust-access-bit-arb 4) + (context-reset-isolation-bit-arb 8)) + +(define-enumeration + glx-context-profile-mask + (context-core-profile-bit-arb 1) + (context-compatibility-profile-bit-arb 2) + (context-es-profile-bit-ext 4) + (context-es2-profile-bit-ext 4)) + +(define-enumeration + glx-attribute + (use-gl 1) + (buffer-size 2) + (level 3) + (rgba 4) + (doublebuffer 5) + (stereo 6) + (aux-buffers 7) + (red-size 8) + (green-size 9) + (blue-size 10) + (alpha-size 11) + (depth-size 12) + (stencil-size 13) + (accum-red-size 14) + (accum-green-size 15) + (accum-blue-size 16) + (accum-alpha-size 17) + (config-caveat 32) + (x-visual-type 34) + (transparent-type 35) + (transparent-index-value 36) + (transparent-red-value 37) + (transparent-green-value 38) + (transparent-blue-value 39) + (transparent-alpha-value 40) + (dont-care 4294967295) + (none 32768) + (slow-config 32769) + (true-color 32770) + (direct-color 32771) + (pseudo-color 32772) + (static-color 32773) + (gray-scale 32774) + (static-gray 32775) + (transparent-rgb 32776) + (transparent-index 32777) + (visual-id 32779) + (screen 32780) + (non-conformant-config 32781) + (drawable-type 32784) + (render-type 32785) + (x-renderable 32786) + (fbconfig-id 32787) + (rgba-type 32788) + (color-index-type 32789) + (max-pbuffer-width 32790) + (max-pbuffer-height 32791) + (max-pbuffer-pixels 32792) + (preserved-contents 32795) + (largest-pbuffer 32796) + (width 32797) + (height 32798) + (event-mask 32799) + (damaged 32800) + (saved 32801) + (window 32802) + (pbuffer 32803) + (pbuffer-height 32832) + (pbuffer-width 32833) + (visual-caveat-ext 32) + (x-visual-type-ext 34) + (transparent-type-ext 35) + (transparent-index-value-ext 36) + (transparent-red-value-ext 37) + (transparent-green-value-ext 38) + (transparent-blue-value-ext 39) + (transparent-alpha-value-ext 40) + (none-ext 32768) + (slow-visual-ext 32769) + (true-color-ext 32770) + (direct-color-ext 32771) + (pseudo-color-ext 32772) + (static-color-ext 32773) + (gray-scale-ext 32774) + (static-gray-ext 32775) + (transparent-rgb-ext 32776) + (transparent-index-ext 32777) + (share-context-ext 32778) + (visual-id-ext 32779) + (screen-ext 32780) + (non-conformant-visual-ext 32781) + (drawable-type-sgix 32784) + (render-type-sgix 32785) + (x-renderable-sgix 32786) + (fbconfig-id-sgix 32787) + (rgba-type-sgix 32788) + (color-index-type-sgix 32789) + (max-pbuffer-width-sgix 32790) + (max-pbuffer-height-sgix 32791) + (max-pbuffer-pixels-sgix 32792) + (optimal-pbuffer-width-sgix 32793) + (optimal-pbuffer-height-sgix 32794) + (preserved-contents-sgix 32795) + (largest-pbuffer-sgix 32796) + (width-sgix 32797) + (height-sgix 32798) + (event-mask-sgix 32799) + (damaged-sgix 32800) + (saved-sgix 32801) + (window-sgix 32802) + (pbuffer-sgix 32803) + (digital-media-pbuffer-sgix 32804) + (blended-rgba-sgis 32805) + (multisample-sub-rect-width-sgis 32806) + (multisample-sub-rect-height-sgis 32807) + (visual-select-group-sgix 32808) + (hyperpipe-id-sgix 32816) + (sample-buffers-sgis 100000) + (samples-sgis 100001) + (sample-buffers-arb 100000) + (samples-arb 100001) + (sample-buffers 100000) + (samples 100001) + (coverage-samples-nv 100001) + (context-major-version-arb 8337) + (context-minor-version-arb 8338) + (context-flags-arb 8340) + (context-allow-buffer-byte-order-mismatch-arb + 8341) + (float-components-nv 8368) + (rgba-unsigned-float-type-ext 8369) + (framebuffer-srgb-capable-arb 8370) + (framebuffer-srgb-capable-ext 8370) + (color-samples-nv 8371) + (rgba-float-type-arb 8377) + (video-out-color-nv 8387) + (video-out-alpha-nv 8388) + (video-out-depth-nv 8389) + (video-out-color-and-alpha-nv 8390) + (video-out-color-and-depth-nv 8391) + (video-out-frame-nv 8392) + (video-out-field-1-nv 8393) + (video-out-field-2-nv 8394) + (video-out-stacked-fields-1-2-nv 8395) + (video-out-stacked-fields-2-1-nv 8396) + (device-id-nv 8397) + (unique-id-nv 8398) + (num-video-capture-slots-nv 8399) + (bind-to-texture-rgb-ext 8400) + (bind-to-texture-rgba-ext 8401) + (bind-to-mipmap-texture-ext 8402) + (bind-to-texture-targets-ext 8403) + (y-inverted-ext 8404) + (texture-format-ext 8405) + (texture-target-ext 8406) + (mipmap-texture-ext 8407) + (texture-format-none-ext 8408) + (texture-format-rgb-ext 8409) + (texture-format-rgba-ext 8410) + (texture-1d-ext 8411) + (texture-2d-ext 8412) + (texture-rectangle-ext 8413) + (front-left-ext 8414) + (front-right-ext 8415) + (back-left-ext 8416) + (back-right-ext 8417) + (front-ext 8414) + (back-ext 8416) + (aux0-ext 8418) + (aux1-ext 8419) + (aux2-ext 8420) + (aux3-ext 8421) + (aux4-ext 8422) + (aux5-ext 8423) + (aux6-ext 8424) + (aux7-ext 8425) + (aux8-ext 8426) + (aux9-ext 8427)) + +(define-enumeration + nv-present-video + (num-video-slots-nv 8432)) + +(define-enumeration + ext-swap-control + (swap-interval-ext 8433) + (max-swap-interval-ext 8434)) + +(define-enumeration + ext-swap-control-tear + (late-swaps-tear-ext 8435)) + +(define-enumeration + ext-buffer-age + (back-buffer-age-ext 8436)) + +(define-enumeration + glx-amd-gpu-association + (gpu-vendor-amd 7936) + (gpu-renderer-string-amd 7937) + (gpu-opengl-version-string-amd 7938) + (gpu-fastest-target-gpus-amd 8610) + (gpu-ram-amd 8611) + (gpu-clock-amd 8612) + (gpu-num-pipes-amd 8613) + (gpu-num-simd-amd 8614) + (gpu-num-rb-amd 8615) + (gpu-num-spi-amd 8616)) + +(define-enumeration + glx-arb-create-context-robustness + (lose-context-on-reset-arb 33362) + (context-reset-notification-strategy-arb 33366) + (no-reset-notification-arb 33377)) + +(define-enumeration + arb-create-context-profile + (context-profile-mask-arb 37158)) + diff --git a/figl/parse.scm b/figl/parse.scm index 3db44c0..54f4200 100644 --- a/figl/parse.scm +++ b/figl/parse.scm @@ -557,6 +557,9 @@ (string->number (substring num 2) 16)) ((string-prefix? "GL_" num) (cons #f (mangle-name (substring num 3)))) + ;; Hackety hack... + ((string-prefix? "GLX_" num) + (cons #f (mangle-name (substring num 4)))) (else (string->number num)))) @@ -633,11 +636,14 @@ ((string-index line #\:) => (lambda (pos) (let* ((ws (or (string-index-right line char-whitespace? 0 pos) 0)) - (headers (map string-trim-both - (string-split (substring line 0 ws) #\,))) + (headers (filter + (compose not string-null?) + (map string-trim-both + (string-split (substring line 0 ws) #\,)))) (def (substring line (1+ ws) pos))) (match (cons def headers) - (("define" headers ...) + ((or ("define" _ ...) + ((? (lambda (x) (string-suffix? "_future_use" x))))) (lp '() '() (finish-block current-headers current-enums accum))) diff --git a/maint/update-enumerations b/maint/update-enumerations index 275eb69..df27fc5 100755 --- a/maint/update-enumerations +++ b/maint/update-enumerations @@ -143,7 +143,8 @@ (write-texi mod-name enums port)))) (define* (main arg0) - (write-enumerations 'gl (parse-gl-enumerations "enum.spec"))) + (write-enumerations 'gl (parse-gl-enumerations "enum.spec")) + (write-enumerations 'glx (parse-gl-enumerations "glxenum.spec"))) (when (batch-mode?) (apply main (command-line))) -- 2.20.1