glx: Drop support for GLX_MESA_allocate_memory
[mesa.git] / src / glx / apple / gen_exports.tcl
1 if 0 {
2 Copyright (c) 2008, 2009 Apple Inc.
3
4 Permission is hereby granted, free of charge, to any person
5 obtaining a copy of this software and associated documentation files
6 (the "Software"), to deal in the Software without restriction,
7 including without limitation the rights to use, copy, modify, merge,
8 publish, distribute, sublicense, and/or sell copies of the Software,
9 and to permit persons to whom the Software is furnished to do so,
10 subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be
13 included in all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
19 HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23
24 Except as contained in this notice, the name(s) of the above
25 copyright holders shall not be used in advertising or otherwise to
26 promote the sale, use or other dealings in this Software without
27 prior written authorization.
28 }
29
30 package require Tcl 8.5
31
32 proc main {argc argv} {
33 if {2 != $argc} {
34 puts stderr "syntax is: [info script] serialized-array-file export.list"
35 return 1
36 }
37
38 set fd [open [lindex $argv 0] r]
39 array set api [read $fd]
40 close $fd
41
42 #Start with 1.0
43 set glxlist [list \
44 glXChooseVisual glXCreateContext glXDestroyContext \
45 glXMakeCurrent glXCopyContext glXSwapBuffers \
46 glXCreateGLXPixmap glXDestroyGLXPixmap \
47 glXQueryExtension glXQueryVersion \
48 glXIsDirect glXGetConfig \
49 glXGetCurrentContext glXGetCurrentDrawable \
50 glXWaitGL glXWaitX glXUseXFont]
51
52 #GLX 1.1 and later
53 lappend glxlist glXQueryExtensionsString glXQueryServerString \
54 glXGetClientString
55
56 #GLX 1.2 and later
57 lappend glxlist glXGetCurrentDisplay
58
59 #GLX 1.3 and later
60 lappend glxlist glXChooseFBConfig glXGetFBConfigAttrib \
61 glXGetFBConfigs glXGetVisualFromFBConfig \
62 glXCreateWindow glXDestroyWindow \
63 glXCreatePixmap glXDestroyPixmap \
64 glXCreatePbuffer glXDestroyPbuffer \
65 glXQueryDrawable glXCreateNewContext \
66 glXMakeContextCurrent glXGetCurrentReadDrawable \
67 glXQueryContext glXSelectEvent glXGetSelectedEvent
68
69 #GLX 1.4 and later
70 lappend glxlist glXGetProcAddress
71
72 #Extensions
73 lappend glxlist glXGetProcAddressARB
74
75 #Old extensions we don't support and never really have, but need for
76 #symbol compatibility. See also: glx_empty.c
77 lappend glxlist glXSwapIntervalSGI glXSwapIntervalMESA \
78 glXGetSwapIntervalMESA glXBeginFrameTrackingMESA \
79 glXEndFrameTrackingMESA glXGetFrameUsageMESA \
80 glXQueryFrameTrackingMESA glXGetVideoSyncSGI \
81 glXWaitVideoSyncSGI glXJoinSwapGroupSGIX \
82 glXBindSwapBarrierSGIX glXQueryMaxSwapBarriersSGIX \
83 glXGetSyncValuesOML glXSwapBuffersMscOML \
84 glXWaitForMscOML glXWaitForSbcOML \
85 glXReleaseBuffersMESA \
86 glXCreateGLXPixmapMESA glXCopySubBufferMESA \
87 glXQueryGLXPbufferSGIX glXCreateGLXPbufferSGIX \
88 glXDestroyGLXPbufferSGIX glXSelectEventSGIX \
89 glXGetSelectedEventSGIX
90
91 #These are for GLX_SGIX_fbconfig, which isn't implemented, because
92 #we have the GLX 1.3 GLXFBConfig functions which are in the standard spec.
93 #It should be possible to support these to some extent.
94 #The old libGL somewhat supported the GLXFBConfigSGIX code, but lacked
95 #pbuffer, and pixmap support.
96 #We mainly just need these stubs for linking with apps, because for
97 #some reason the OpenGL site suggests using the latest glxext.h,
98 #and glxext.h defines all GLX extensions, which doesn't seem right for
99 #compile-time capability detection.
100 #See also: http://www.mesa3d.org/brianp/sig97/exten.htm#Compile
101 #which conflicts with: the ABI registry from what I saw on opengl.org.
102 #By disabling some of the #defines in glxext.h we break some software,
103 #and by enabling them without the symbols we break others (in Mesa).
104 #I think a lot of OpenGL-based programs have issues one way or another.
105 #It seems that even Mesa developers are confused on this issue, because
106 #Mesa-7.3/progs/xdemos/glxgears_fbconfig.c has comments about breakage
107 #in some comments.
108 lappend glxlist glXGetFBConfigAttribSGIX \
109 glXChooseFBConfigSGIX \
110 glXGetVisualFromFBConfigSGIX \
111 glXCreateGLXPixmapWithConfigSGIX \
112 glXCreateContextWithConfigSGIX \
113 glXGetFBConfigFromVisualSGIX
114
115
116 set fd [open [lindex $argv 1] w]
117
118 foreach f [lsort -dictionary [array names api]] {
119 puts $fd _gl$f
120 }
121
122 foreach f [lsort -dictionary $glxlist] {
123 puts $fd _$f
124 }
125
126 close $fd
127
128 return 0
129 }
130
131 exit [main $::argc $::argv]