4 # First, the basics and the wgl functions
10 @ stdcall wglCreateContext(long) wglCreateContext
11 @ stdcall wglCreateLayerContext(long long) wglCreateLayerContext
12 @ stdcall wglCopyContext(long long long) wglCopyContext
13 @ stdcall wglDeleteContext(long) wglDeleteContext
14 @ stdcall wglDescribeLayerPlane(long long long long ptr) wglDescribeLayerPlane
15 @ stdcall wglGetCurrentContext() wglGetCurrentContext
16 @ stdcall wglGetCurrentDC() wglGetCurrentDC
17 @ stdcall wglGetLayerPaletteEntries(long long long long ptr) wglGetLayerPaletteEntries
18 @ stdcall wglGetProcAddress(str) wglGetProcAddress
19 @ stdcall wglMakeCurrent(long long) wglMakeCurrent
20 @ stdcall wglRealizeLayerPalette(long long long) wglRealizeLayerPalette
21 @ stdcall wglSetLayerPaletteEntries(long long long long ptr) wglSetLayerPaletteEntries
22 @ stdcall wglShareLists(long long) wglShareLists
23 @ stdcall wglSwapLayerBuffers(long long) wglSwapLayerBuffers
24 @ stdcall wglUseFontBitmapsA(long long long long) wglUseFontBitmapsA
25 @ stdcall wglUseFontOutlinesA(long long long long long long long ptr) wglUseFontOutlinesA
26 @ stub glGetLevelParameterfv
27 @ stub glGetLevelParameteriv
28 @ stub wglUseFontBitmapsW
29 @ stub wglUseFontOutlinesW
30 @ forward wglChoosePixelFormat GDI32.ChoosePixelFormat
31 @ forward wglDescribePixelFormat GDI32.DescribePixelFormat
32 @ forward wglGetPixelFormat GDI32.GetPixelFormat
33 @ forward wglSetPixelFormat GDI32.SetPixelFormat
34 @ forward wglSwapBuffers GDI32.SwapBuffers
38 # Now, the functions from the include file
40 open(INC, "/usr/X11R6/include/GL/gl.h") || die "Could not open GL/gl.h";
42 while ($line = <INC>) {
43 if ($line =~ /GLAPI.*GLAPIENTRY/) {
44 # Start of a function declaration
45 ($name, $args) = ($line =~ /GLAPIENTRY *(.*)\((.*)/);
47 # Remove all extensions except the multitexture one (see OpenGL ABI)
48 if (($name !~ /(MESA|PGI|ARB|EXT)/) ||
49 ($name =~ /MultiTexCoord/) ||
50 ($name =~ /ActiveTextureARB/)) {
51 print "@ stdcall $name(";
53 # Now, get the parameters
55 @args = split /,/, $args;
59 ($_) = ($_ =~ /(.*)\)/);
64 } elsif ($_ =~ /[a-zA-Z]/) {
65 ($type) = ($_ =~ /^ *(.*) +.*/);
66 if (($type =~ /double/) ||
67 ($type =~ /clampd/)) {
69 } elsif ($type !~ /void/) {
82 print ") wine_$name\n";