- added option to get double-buffered desktop
[wine.git] / dlls / opengl32 / make_opengl_spec
blob0feb92bf2a59436c415de00ddbc226445303deb7
1 #!/usr/bin/perl -w
4 # First, the basics and the wgl functions
6 print "
7 name opengl32
8 type win32
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) 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
54 while (1) {
55 @args = split /,/, $args;
57 foreach (@args) {
58 if ($_ =~ /\)/) {
59 ($_) = ($_ =~ /(.*)\)/);
62 if ($_ =~ /\*/) {
63 print "ptr ";
64 } elsif ($_ =~ /[a-zA-Z]/) {
65 ($type) = ($_ =~ /^ *(.*) +.*/);
66 if ($type =~ /double/) {
67 print "double ";
68 } elsif ($type !~ /void/) {
69 print "long ";
74 if ($args !~ /\)/) {
75 $args = <INC>;
76 } else {
77 last;
81 print ") wine_$name\n";
86 close(INC);