From: Rémi Bernon rbernon@codeweavers.com
--- configure.ac | 4 +- dlls/opengl32/make_opengl | 130 +++++++++++-- dlls/wineandroid.drv/opengl.c | 5 +- dlls/winewayland.drv/opengl.c | 10 +- include/wine/opengl_driver.h | 1 + include/wine/wgl.h | 334 ++++++++++++++++++++++++++++++++++ 6 files changed, 451 insertions(+), 33 deletions(-)
diff --git a/configure.ac b/configure.ac index fd6e78a204b..0a9d37f94d7 100644 --- a/configure.ac +++ b/configure.ac @@ -647,7 +647,6 @@ m4_ifdef([AC_SYS_YEAR2038],
AC_CHECK_HEADERS(\ CL/cl.h \ - EGL/egl.h \ OpenCL/opencl.h \ arpa/inet.h \ arpa/nameser.h \ @@ -1403,8 +1402,7 @@ then if test "x$with_opengl" != "xno" then WINE_PACKAGE_FLAGS(EGL,[egl],[-lEGL],,, - [AC_CHECK_HEADER([EGL/egl.h], - [WINE_CHECK_SONAME(EGL,eglGetProcAddress,,,[$EGL_LIBS])])]) + [WINE_CHECK_SONAME(EGL,eglGetProcAddress,,,[$EGL_LIBS])]) WINE_PACKAGE_FLAGS(WAYLAND_EGL,[wayland-egl],,,, [AC_CHECK_HEADER([wayland-egl.h], [AC_CHECK_LIB(wayland-egl,wl_egl_window_create, diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index df877b1c07c..fa4983384a5 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -11,6 +11,7 @@ use File::Basename; # # https://raw.github.com/KhronosGroup/OpenGL-Registry/master/xml/gl.xml # https://raw.github.com/KhronosGroup/OpenGL-Registry/master/xml/wgl.xml +# https://raw.github.com/KhronosGroup/EGL-Registry/refs/heads/main/api/egl.xml # # If they are not found in the current directory the script will # attempt to download them from there. @@ -140,7 +141,12 @@ my %khronos_types = "khronos_uint16_t" => "unsigned short", "khronos_int32_t" => "int", "khronos_uint32_t" => "unsigned int", + "khronos_int64_t" => "__int64", + "khronos_uint64_t" => "unsigned __int64", + "khronos_ssize_t" => "ssize_t", "khronos_float_t" => "float", + "khronos_utime_nanoseconds_t" => "unsigned __int64", + "khronos_stime_nanoseconds_t" => "__int64", );
my %manual_win_functions = @@ -623,13 +629,16 @@ if ($version eq "1.0") { # # Fetch the registry files # -my $url="https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry"; -my $commit="03e1bfb87c4664d34dc7822fb591841eec747094"; +my $ogl_url="https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry"; +my $ogl_commit="03e1bfb87c4664d34dc7822fb591841eec747094"; +my $egl_url="https://raw.githubusercontent.com/KhronosGroup/EGL-Registry"; +my $egl_commit="bd4838f57cd7e0cb6e4a4154919af426b038695d"; my $cache = ($ENV{XDG_CACHE_HOME} || "$ENV{HOME}/.cache") . "/wine";
system "mkdir", "-p", $cache; --f "$cache/gl-$commit.xml" || system "wget", "-q", "-O", "$cache/gl-$commit.xml", "$url/$commit/xml/gl.xml" || die "cannot download gl.xml"; --f "$cache/wgl-$commit.xml" || system "wget", "-q", "-O", "$cache/wgl-$commit.xml", "$url/$commit/xml/wgl.xml" || die "cannot download wgl.xml"; +-f "$cache/gl-$ogl_commit.xml" || system "wget", "-q", "-O", "$cache/gl-$ogl_commit.xml", "$ogl_url/$ogl_commit/xml/gl.xml" || die "cannot download gl.xml"; +-f "$cache/wgl-$ogl_commit.xml" || system "wget", "-q", "-O", "$cache/wgl-$ogl_commit.xml", "$ogl_url/$ogl_commit/xml/wgl.xml" || die "cannot download wgl.xml"; +-f "$cache/egl-$egl_commit.xml" || system "wget", "-q", "-O", "$cache/egl-$egl_commit.xml", "$egl_url/$egl_commit/api/egl.xml" || die "cannot download egl.xml"; chdir(dirname($0));
# @@ -649,8 +658,17 @@ chdir(dirname($0)); my %norm_functions; my %ext_functions; my %wgl_functions; -my %gl_enums; -my (%gl_types, @gl_types); # also use an array to preserve declaration order +my %egl_functions; +my %all_enums; + +my %gl_types = + ( + "EGLint" => "typedef khronos_int32_t EGLint;", + "EGLNativeDisplayType" => "typedef void *EGLNativeDisplayType;", + "EGLNativePixmapType" => "typedef void *EGLNativePixmapType;", + "EGLNativeWindowType" => "typedef void *EGLNativeWindowType;", + ); +my @gl_types = ( sort keys %gl_types ); # also use an array to preserve declaration order
my %remapped_wgl_functions = ( @@ -693,6 +711,16 @@ my %supported_wgl_extensions = "WGL_WINE_pixel_format_passthrough" => 1, "WGL_WINE_query_renderer" => 1, ); +my %supported_egl_extensions = + ( + "EGL_EXT_pixel_format_float" => 1, + "EGL_EXT_present_opaque" => 1, + "EGL_KHR_create_context" => 1, + "EGL_KHR_create_context_no_error" => 1, + "EGL_KHR_no_config_context" => 1, + "EGL_KHR_platform_android" => 1, + "EGL_KHR_platform_wayland" => 1, + );
my %supported_apis = ( @@ -759,7 +787,7 @@ sub parse_file($) next unless $name; $name = $name->textContent; push @gl_types, $name unless $gl_types{$name}; - $gl_types{$name} = $type; + $gl_types{$name} = $type->textContent; }
# generate norm functions @@ -782,6 +810,18 @@ sub parse_file($) $wgl_functions{$name} = $functions{$name} if defined $functions{$name}; } } + elsif ($feature->{api} eq "egl") + { + foreach my $cmd ($feature->findnodes("./require/command")) + { + my $name = $cmd->{name}; + $egl_functions{$name} = $functions{$cmd->{name}}; + } + foreach my $enum ($feature->findnodes("./require/enum")) + { + $all_enums{$enum->{name}} = $enums{$enum->{name}}; + } + } next unless defined $norm_categories{$feature->{name}}; foreach my $cmd ($feature->findnodes("./require/command")) { @@ -789,7 +829,7 @@ sub parse_file($) } foreach my $enum ($feature->findnodes("./require/enum")) { - $gl_enums{$enum->{name}} = $enums{$enum->{name}}; + $all_enums{$enum->{name}} = $enums{$enum->{name}}; } }
@@ -806,7 +846,7 @@ sub parse_file($) } foreach my $enum ($feature->findnodes("./require/enum")) { - $gl_enums{$enum->{name}} = $enums{$enum->{name}}; + $all_enums{$enum->{name}} = $enums{$enum->{name}}; } }
@@ -823,7 +863,21 @@ sub parse_file($) } foreach my $enum ($ext->findnodes("./require/enum")) { - $gl_enums{$enum->{name}} = $enums{$enum->{name}}; + $all_enums{$enum->{name}} = $enums{$enum->{name}}; + } + next; + } + if ($ext->{supported} eq "egl") + { + next unless defined $supported_egl_extensions{$ext->{name}}; + foreach my $cmd ($ext->findnodes("./require/command")) + { + my $name = $cmd->{name}; + $ext_functions{$name} = [ $functions{$name}[0], $functions{$name}[1], [ $ext->{name} ] ]; + } + foreach my $enum ($ext->findnodes("./require/enum")) + { + $all_enums{$enum->{name}} = $enums{$enum->{name}}; } next; } @@ -847,13 +901,14 @@ sub parse_file($) } foreach my $enum ($ext->findnodes("./require/enum")) { - $gl_enums{$enum->{name}} = $enums{$enum->{name}}; + $all_enums{$enum->{name}} = $enums{$enum->{name}}; } } }
-parse_file( "$cache/gl-$commit.xml" ); -parse_file( "$cache/wgl-$commit.xml" ); +parse_file( "$cache/gl-$ogl_commit.xml" ); +parse_file( "$cache/wgl-$ogl_commit.xml" ); +parse_file( "$cache/egl-$egl_commit.xml" ); parse_file( "winegl.xml" );
# @@ -866,9 +921,11 @@ print HEADER "#define __WINE_WGL_H\n\n";
print HEADER "#include <stdarg.h>\n"; print HEADER "#include <stddef.h>\n"; +print HEADER "#include <stdint.h>\n"; print HEADER "#include <windef.h>\n"; print HEADER "#include <winbase.h>\n"; print HEADER "#include <wingdi.h>\n"; +print HEADER "#include <sys/types.h>\n"; print HEADER "\n";
print HEADER "#ifdef WINE_UNIX_LIB\n"; @@ -881,19 +938,23 @@ print HEADER "#ifndef GLAPIENTRY\n"; print HEADER "#define GLAPIENTRY __stdcall\n"; print HEADER "#endif\n\n";
+print HEADER "#ifndef EGL_CAST\n"; +print HEADER "#define EGL_CAST(t,x) ((t)(x))\n"; +print HEADER "#endif\n\n"; + foreach (@gl_types) { - my $type = $gl_types{$_}->textContent(); + my $type = $gl_types{$_}; foreach my $t (keys %khronos_types) { $type =~ s/\s(\Q$t\E)\s/ $khronos_types{$t} /; } printf HEADER $type . "\n"; } print HEADER "\n";
my $maxlen = 1; -foreach (keys %gl_enums) { $maxlen = length($_) if length($_) > $maxlen; } -foreach (sort keys %gl_enums) +foreach (keys %all_enums) { $maxlen = length($_) if length($_) > $maxlen; } +foreach (sort keys %all_enums) { - printf HEADER "#define %-*s %s\n", $maxlen, $_, $gl_enums{$_}; + printf HEADER "#define %-*s %s\n", $maxlen, $_, $all_enums{$_}; } print HEADER "\n";
@@ -913,6 +974,13 @@ foreach (sort keys %wgl_functions) printf HEADER "typedef %-10s (GLAPIENTRY *PFN_$_)($decl_args);\n", $func_ret; }
+foreach (sort keys %egl_functions) +{ + my $decl_args = get_func_args( $egl_functions{$_}, 1, 0, "" ); + my $func_ret = get_func_ret( $egl_functions{$_}, 0 ); + printf HEADER "typedef %-10s (GLAPIENTRY *PFN_$_)($decl_args);\n", $func_ret; +} + foreach (sort keys %norm_functions) { my $decl_args = get_func_args( $norm_functions{$_}, 1, 0, "" ); @@ -941,6 +1009,20 @@ foreach (sort keys %ext_functions) printf HEADER " \\n USE_GL_FUNC(%s)", $_; } print HEADER "\n\n"; +print HEADER "#define ALL_EGL_FUNCS"; +foreach (sort keys %egl_functions) +{ + next unless $_ =~ /^egl/; + printf HEADER " \\n USE_GL_FUNC(%s)", $_; +} +print HEADER "\n\n"; +print HEADER "#define ALL_EGL_EXT_FUNCS"; +foreach (sort keys %ext_functions) +{ + next unless $_ =~ /^egl/; + printf HEADER " \\n USE_GL_FUNC(%s)", $_; +} +print HEADER "\n\n"; print HEADER "#define ALL_GL_FUNCS"; foreach (sort keys %norm_functions) { @@ -1013,6 +1095,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; print OUT generate_func_params($_, $ext_functions{$_}); } @@ -1045,6 +1128,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; printf OUT " unix_%s,\n", $_; } @@ -1103,6 +1187,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; next if defined $manual_win_thunks{$_}; print OUT "\nstatic " . generate_win_thunk($_, $ext_functions{$_}); @@ -1111,6 +1196,7 @@ print OUT "\n";
foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next unless defined $manual_win_functions{$_} || $manual_win_thunks{$_}; my $decl_args = get_func_args( $ext_functions{$_}, 1, 0, "" ); my $func_ret = get_func_ret( $ext_functions{$_}, 0 ); @@ -1121,6 +1207,7 @@ print OUT "const void *extension_procs[] =\n"; print OUT "{\n"; foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API printf OUT " %s,\n", $_; } print OUT "};\n"; @@ -1170,6 +1257,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; next unless needs_wrapper( $_, $ext_functions{$_} ); print OUT "extern NTSTATUS ext_$_( void *args );\n"; @@ -1192,6 +1280,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; next if needs_wrapper( $_, $ext_functions{$_} ); print OUT "static " unless defined $manual_wow64_thunks{$_}; @@ -1216,6 +1305,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; printf OUT " ext_%s,\n", $_; } @@ -1242,6 +1332,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; next if defined $manual_wow64_thunks{$_}; print OUT generate_wow64_thunk($_, $ext_functions{$_}, "ext"); @@ -1261,6 +1352,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; next unless defined $manual_wow64_thunks{$_}; print OUT "extern NTSTATUS wow64_ext_$_( void *args );\n"; @@ -1284,6 +1376,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; printf OUT " wow64_ext_%s,\n", $_; } @@ -1310,6 +1403,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; print OUT generate_null_func($_, $ext_functions{$_}); } @@ -1330,6 +1424,7 @@ foreach (sort keys %norm_functions) } foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API next if defined $manual_win_functions{$_}; print OUT " .p_$_ = null_$_,\n"; } @@ -1342,6 +1437,7 @@ print OUT "const struct registry_entry extension_registry[$count] =\n"; print OUT "{\n"; foreach (sort keys %ext_functions) { + next if $_ =~ /^egl/; # unix-side only API my $func = $ext_functions{$_}; printf OUT " { "%s", "%s", offsetof(struct opengl_funcs, p_$_) },\n", $_, join(" ", sort @{$func->[2]}); } diff --git a/dlls/wineandroid.drv/opengl.c b/dlls/wineandroid.drv/opengl.c index aacb0c6a1fc..ddcd140a82f 100644 --- a/dlls/wineandroid.drv/opengl.c +++ b/dlls/wineandroid.drv/opengl.c @@ -35,9 +35,6 @@ #include <stdlib.h> #include <string.h> #include <dlfcn.h> -#ifdef HAVE_EGL_EGL_H -#include <EGL/egl.h> -#endif
#include "ntstatus.h" #define WIN32_NO_STATUS @@ -49,7 +46,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(android);
-#define DECL_FUNCPTR(f) typeof(f) * p_##f = NULL +#define DECL_FUNCPTR(f) static PFN_##f p_##f = NULL DECL_FUNCPTR( eglCreateContext ); DECL_FUNCPTR( eglCreateWindowSurface ); DECL_FUNCPTR( eglCreatePbufferSurface ); diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c index ef1fb49368b..9bc33393295 100644 --- a/dlls/winewayland.drv/opengl.c +++ b/dlls/winewayland.drv/opengl.c @@ -39,17 +39,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(waylanddrv);
#include <wayland-egl.h> -#include <EGL/egl.h> -#include <EGL/eglext.h>
#include "wine/opengl_driver.h"
-/* Support building on systems with older EGL headers, which may not include - * the EGL_EXT_present_opaque extension. */ -#ifndef EGL_PRESENT_OPAQUE_EXT -#define EGL_PRESENT_OPAQUE_EXT 0x31DF -#endif - static void *egl_handle; static EGLDisplay egl_display; static char wgl_extensions[4096]; @@ -57,7 +49,7 @@ static EGLConfig *egl_configs; static int num_egl_configs; static BOOL has_egl_ext_pixel_format_float;
-#define DECL_FUNCPTR(f) static typeof(f) * p_##f +#define DECL_FUNCPTR(f) static PFN_##f p_##f DECL_FUNCPTR(eglBindAPI); DECL_FUNCPTR(eglChooseConfig); DECL_FUNCPTR(eglCreateContext); diff --git a/include/wine/opengl_driver.h b/include/wine/opengl_driver.h index 7d8bed72d60..e87085da7b6 100644 --- a/include/wine/opengl_driver.h +++ b/include/wine/opengl_driver.h @@ -105,6 +105,7 @@ struct opengl_funcs BOOL (*p_wglSetPixelFormatWINE)( HDC hdc, int format ); BOOL (*p_wglSwapIntervalEXT)( int interval ); #define USE_GL_FUNC(x) PFN_##x p_##x; + ALL_EGL_FUNCS ALL_GL_FUNCS ALL_GL_EXT_FUNCS #undef USE_GL_FUNC diff --git a/include/wine/wgl.h b/include/wine/wgl.h index 4419704e84e..6ba341d11a4 100644 --- a/include/wine/wgl.h +++ b/include/wine/wgl.h @@ -5,9 +5,11 @@
#include <stdarg.h> #include <stddef.h> +#include <stdint.h> #include <windef.h> #include <winbase.h> #include <wingdi.h> +#include <sys/types.h>
#ifdef WINE_UNIX_LIB #define GL_NO_PROTOTYPES @@ -18,6 +20,14 @@ #define GLAPIENTRY __stdcall #endif
+#ifndef EGL_CAST +#define EGL_CAST(t,x) ((t)(x)) +#endif + +typedef void *EGLNativeDisplayType; +typedef void *EGLNativePixmapType; +typedef void *EGLNativeWindowType; +typedef int EGLint; typedef unsigned int GLenum; typedef unsigned char GLboolean; typedef unsigned int GLbitfield; @@ -75,8 +85,240 @@ DECLARE_HANDLE(HGPUNV); DECLARE_HANDLE(HVIDEOINPUTDEVICENV); typedef struct _GPU_DEVICE GPU_DEVICE; typedef struct _GPU_DEVICE *PGPU_DEVICE; +struct AHardwareBuffer; +struct wl_buffer; +struct wl_display; +struct wl_resource; +typedef unsigned int EGLBoolean; +typedef unsigned int EGLenum; +typedef intptr_t EGLAttribKHR; +typedef intptr_t EGLAttrib; +typedef void *EGLClientBuffer; +typedef void *EGLConfig; +typedef void *EGLContext; +typedef void *EGLDeviceEXT; +typedef void *EGLDisplay; +typedef void *EGLImage; +typedef void *EGLImageKHR; +typedef void *EGLLabelKHR; +typedef void *EGLObjectKHR; +typedef void *EGLOutputLayerEXT; +typedef void *EGLOutputPortEXT; +typedef void *EGLStreamKHR; +typedef void *EGLSurface; +typedef void *EGLSync; +typedef void *EGLSyncKHR; +typedef void *EGLSyncNV; +typedef void (*__eglMustCastToProperFunctionPointerType)(void); +typedef unsigned __int64 EGLTimeKHR; +typedef unsigned __int64 EGLTime; +typedef unsigned __int64 EGLTimeNV; +typedef unsigned __int64 EGLuint64NV; +typedef unsigned __int64 EGLuint64KHR; +typedef __int64 EGLnsecsANDROID; +typedef int EGLNativeFileDescriptorKHR; +typedef ssize_t EGLsizeiANDROID; +typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); +typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); +struct EGLClientPixmapHI { + void *pData; + EGLint iWidth; + EGLint iHeight; + EGLint iStride; +}; +typedef void ( *EGLDEBUGPROCKHR)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message); +#define PFNEGLBINDWAYLANDDISPLAYWL PFNEGLBINDWAYLANDDISPLAYWLPROC +#define PFNEGLUNBINDWAYLANDDISPLAYWL PFNEGLUNBINDWAYLANDDISPLAYWLPROC +#define PFNEGLQUERYWAYLANDBUFFERWL PFNEGLQUERYWAYLANDBUFFERWLPROC +#define PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC typedef unsigned int GLhandleARB;
+#define EGL_ALPHA_FORMAT 0x3088 +#define EGL_ALPHA_FORMAT_NONPRE 0x308B +#define EGL_ALPHA_FORMAT_PRE 0x308C +#define EGL_ALPHA_MASK_SIZE 0x303E +#define EGL_ALPHA_SIZE 0x3021 +#define EGL_BACK_BUFFER 0x3084 +#define EGL_BAD_ACCESS 0x3002 +#define EGL_BAD_ALLOC 0x3003 +#define EGL_BAD_ATTRIBUTE 0x3004 +#define EGL_BAD_CONFIG 0x3005 +#define EGL_BAD_CONTEXT 0x3006 +#define EGL_BAD_CURRENT_SURFACE 0x3007 +#define EGL_BAD_DISPLAY 0x3008 +#define EGL_BAD_MATCH 0x3009 +#define EGL_BAD_NATIVE_PIXMAP 0x300A +#define EGL_BAD_NATIVE_WINDOW 0x300B +#define EGL_BAD_PARAMETER 0x300C +#define EGL_BAD_SURFACE 0x300D +#define EGL_BIND_TO_TEXTURE_RGB 0x3039 +#define EGL_BIND_TO_TEXTURE_RGBA 0x303A +#define EGL_BLUE_SIZE 0x3022 +#define EGL_BUFFER_DESTROYED 0x3095 +#define EGL_BUFFER_PRESERVED 0x3094 +#define EGL_BUFFER_SIZE 0x3020 +#define EGL_CLIENT_APIS 0x308D +#define EGL_CL_EVENT_HANDLE 0x309C +#define EGL_COLORSPACE 0x3087 +#define EGL_COLORSPACE_LINEAR 0x308A +#define EGL_COLORSPACE_sRGB 0x3089 +#define EGL_COLOR_BUFFER_TYPE 0x303F +#define EGL_COLOR_COMPONENT_TYPE_EXT 0x3339 +#define EGL_COLOR_COMPONENT_TYPE_FIXED_EXT 0x333A +#define EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT 0x333B +#define EGL_CONDITION_SATISFIED 0x30F6 +#define EGL_CONFIG_CAVEAT 0x3027 +#define EGL_CONFIG_ID 0x3028 +#define EGL_CONFORMANT 0x3042 +#define EGL_CONTEXT_CLIENT_TYPE 0x3097 +#define EGL_CONTEXT_CLIENT_VERSION 0x3098 +#define EGL_CONTEXT_FLAGS_KHR 0x30FC +#define EGL_CONTEXT_LOST 0x300E +#define EGL_CONTEXT_MAJOR_VERSION 0x3098 +#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098 +#define EGL_CONTEXT_MINOR_VERSION 0x30FB +#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB +#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002 +#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002 +#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001 +#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001 +#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0 +#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001 +#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1 +#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002 +#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31B3 +#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD +#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD +#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD +#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD +#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2 +#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004 +#define EGL_CORE_NATIVE_ENGINE 0x305B +#define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType,0) +#define EGL_DEPTH_SIZE 0x3025 +#define EGL_DISPLAY_SCALING 10000 +#define EGL_DONT_CARE EGL_CAST(EGLint,-1) +#define EGL_DRAW 0x3059 +#define EGL_EXTENSIONS 0x3055 +#define EGL_FALSE 0 +#define EGL_FOREVER 0xFFFFFFFFFFFFFFFF +#define EGL_GL_COLORSPACE 0x309D +#define EGL_GL_COLORSPACE_LINEAR 0x308A +#define EGL_GL_COLORSPACE_SRGB 0x3089 +#define EGL_GL_RENDERBUFFER 0x30B9 +#define EGL_GL_TEXTURE_2D 0x30B1 +#define EGL_GL_TEXTURE_3D 0x30B2 +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 +#define EGL_GL_TEXTURE_LEVEL 0x30BC +#define EGL_GL_TEXTURE_ZOFFSET 0x30BD +#define EGL_GREEN_SIZE 0x3023 +#define EGL_HEIGHT 0x3056 +#define EGL_HORIZONTAL_RESOLUTION 0x3090 +#define EGL_IMAGE_PRESERVED 0x30D2 +#define EGL_LARGEST_PBUFFER 0x3058 +#define EGL_LEVEL 0x3029 +#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF +#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF +#define EGL_LUMINANCE_BUFFER 0x308F +#define EGL_LUMINANCE_SIZE 0x303D +#define EGL_MATCH_NATIVE_PIXMAP 0x3041 +#define EGL_MAX_PBUFFER_HEIGHT 0x302A +#define EGL_MAX_PBUFFER_PIXELS 0x302B +#define EGL_MAX_PBUFFER_WIDTH 0x302C +#define EGL_MAX_SWAP_INTERVAL 0x303C +#define EGL_MIN_SWAP_INTERVAL 0x303B +#define EGL_MIPMAP_LEVEL 0x3083 +#define EGL_MIPMAP_TEXTURE 0x3082 +#define EGL_MULTISAMPLE_RESOLVE 0x3099 +#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B +#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 +#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A +#define EGL_NATIVE_RENDERABLE 0x302D +#define EGL_NATIVE_VISUAL_ID 0x302E +#define EGL_NATIVE_VISUAL_TYPE 0x302F +#define EGL_NONE 0x3038 +#define EGL_NON_CONFORMANT_CONFIG 0x3051 +#define EGL_NOT_INITIALIZED 0x3001 +#define EGL_NO_CONFIG_KHR EGL_CAST(EGLConfig,0) +#define EGL_NO_CONTEXT EGL_CAST(EGLContext,0) +#define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0) +#define EGL_NO_IMAGE EGL_CAST(EGLImage,0) +#define EGL_NO_RESET_NOTIFICATION 0x31BE +#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE +#define EGL_NO_SURFACE EGL_CAST(EGLSurface,0) +#define EGL_NO_SYNC EGL_CAST(EGLSync,0) +#define EGL_NO_TEXTURE 0x305C +#define EGL_OPENGL_API 0x30A2 +#define EGL_OPENGL_BIT 0x0008 +#define EGL_OPENGL_ES2_BIT 0x0004 +#define EGL_OPENGL_ES3_BIT 0x00000040 +#define EGL_OPENGL_ES3_BIT_KHR 0x00000040 +#define EGL_OPENGL_ES_API 0x30A0 +#define EGL_OPENGL_ES_BIT 0x0001 +#define EGL_OPENVG_API 0x30A1 +#define EGL_OPENVG_BIT 0x0002 +#define EGL_OPENVG_IMAGE 0x3096 +#define EGL_PBUFFER_BIT 0x0001 +#define EGL_PIXEL_ASPECT_RATIO 0x3092 +#define EGL_PIXMAP_BIT 0x0002 +#define EGL_PLATFORM_ANDROID_KHR 0x3141 +#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 +#define EGL_PRESENT_OPAQUE_EXT 0x31DF +#define EGL_READ 0x305A +#define EGL_RED_SIZE 0x3024 +#define EGL_RENDERABLE_TYPE 0x3040 +#define EGL_RENDER_BUFFER 0x3086 +#define EGL_RGB_BUFFER 0x308E +#define EGL_SAMPLES 0x3031 +#define EGL_SAMPLE_BUFFERS 0x3032 +#define EGL_SIGNALED 0x30F2 +#define EGL_SINGLE_BUFFER 0x3085 +#define EGL_SLOW_CONFIG 0x3050 +#define EGL_STENCIL_SIZE 0x3026 +#define EGL_SUCCESS 0x3000 +#define EGL_SURFACE_TYPE 0x3033 +#define EGL_SWAP_BEHAVIOR 0x3093 +#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 +#define EGL_SYNC_CL_EVENT 0x30FE +#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF +#define EGL_SYNC_CONDITION 0x30F8 +#define EGL_SYNC_FENCE 0x30F9 +#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001 +#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0 +#define EGL_SYNC_STATUS 0x30F1 +#define EGL_SYNC_TYPE 0x30F7 +#define EGL_TEXTURE_2D 0x305F +#define EGL_TEXTURE_FORMAT 0x3080 +#define EGL_TEXTURE_RGB 0x305D +#define EGL_TEXTURE_RGBA 0x305E +#define EGL_TEXTURE_TARGET 0x3081 +#define EGL_TIMEOUT_EXPIRED 0x30F5 +#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 +#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 +#define EGL_TRANSPARENT_RED_VALUE 0x3037 +#define EGL_TRANSPARENT_RGB 0x3052 +#define EGL_TRANSPARENT_TYPE 0x3034 +#define EGL_TRUE 1 +#define EGL_UNKNOWN EGL_CAST(EGLint,-1) +#define EGL_UNSIGNALED 0x30F3 +#define EGL_VENDOR 0x3053 +#define EGL_VERSION 0x3054 +#define EGL_VERTICAL_RESOLUTION 0x3091 +#define EGL_VG_ALPHA_FORMAT 0x3088 +#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B +#define EGL_VG_ALPHA_FORMAT_PRE 0x308C +#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 +#define EGL_VG_COLORSPACE 0x3087 +#define EGL_VG_COLORSPACE_LINEAR 0x308A +#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 +#define EGL_VG_COLORSPACE_sRGB 0x3089 +#define EGL_WIDTH 0x3057 +#define EGL_WINDOW_BIT 0x0004 #define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 #define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 #define ERROR_INVALID_PROFILE_ARB 0x2096 @@ -5608,6 +5850,50 @@ typedef BOOL (GLAPIENTRY *PFN_wglUseFontBitmapsA)( HDC hDC, DWORD first, D typedef BOOL (GLAPIENTRY *PFN_wglUseFontBitmapsW)( HDC hDC, DWORD first, DWORD count, DWORD listBase ); typedef BOOL (GLAPIENTRY *PFN_wglUseFontOutlinesA)( HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf ); typedef BOOL (GLAPIENTRY *PFN_wglUseFontOutlinesW)( HDC hDC, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglBindAPI)( EGLenum api ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglBindTexImage)( EGLDisplay dpy, EGLSurface surface, EGLint buffer ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglChooseConfig)( EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config ); +typedef EGLint (GLAPIENTRY *PFN_eglClientWaitSync)( EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglCopyBuffers)( EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target ); +typedef EGLContext (GLAPIENTRY *PFN_eglCreateContext)( EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list ); +typedef EGLImage (GLAPIENTRY *PFN_eglCreateImage)( EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list ); +typedef EGLSurface (GLAPIENTRY *PFN_eglCreatePbufferFromClientBuffer)( EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list ); +typedef EGLSurface (GLAPIENTRY *PFN_eglCreatePbufferSurface)( EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list ); +typedef EGLSurface (GLAPIENTRY *PFN_eglCreatePixmapSurface)( EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list ); +typedef EGLSurface (GLAPIENTRY *PFN_eglCreatePlatformPixmapSurface)( EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list ); +typedef EGLSurface (GLAPIENTRY *PFN_eglCreatePlatformWindowSurface)( EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list ); +typedef EGLSync (GLAPIENTRY *PFN_eglCreateSync)( EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list ); +typedef EGLSurface (GLAPIENTRY *PFN_eglCreateWindowSurface)( EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglDestroyContext)( EGLDisplay dpy, EGLContext ctx ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglDestroyImage)( EGLDisplay dpy, EGLImage image ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglDestroySurface)( EGLDisplay dpy, EGLSurface surface ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglDestroySync)( EGLDisplay dpy, EGLSync sync ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglGetConfigAttrib)( EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglGetConfigs)( EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config ); +typedef EGLContext (GLAPIENTRY *PFN_eglGetCurrentContext)(void); +typedef EGLDisplay (GLAPIENTRY *PFN_eglGetCurrentDisplay)(void); +typedef EGLSurface (GLAPIENTRY *PFN_eglGetCurrentSurface)( EGLint readdraw ); +typedef EGLDisplay (GLAPIENTRY *PFN_eglGetDisplay)( EGLNativeDisplayType display_id ); +typedef EGLint (GLAPIENTRY *PFN_eglGetError)(void); +typedef EGLDisplay (GLAPIENTRY *PFN_eglGetPlatformDisplay)( EGLenum platform, void *native_display, const EGLAttrib *attrib_list ); +typedef __eglMustCastToProperFunctionPointerType (GLAPIENTRY *PFN_eglGetProcAddress)( const char *procname ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglGetSyncAttrib)( EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglInitialize)( EGLDisplay dpy, EGLint *major, EGLint *minor ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglMakeCurrent)( EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx ); +typedef EGLenum (GLAPIENTRY *PFN_eglQueryAPI)(void); +typedef EGLBoolean (GLAPIENTRY *PFN_eglQueryContext)( EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value ); +typedef const char * (GLAPIENTRY *PFN_eglQueryString)( EGLDisplay dpy, EGLint name ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglQuerySurface)( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglReleaseTexImage)( EGLDisplay dpy, EGLSurface surface, EGLint buffer ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglReleaseThread)(void); +typedef EGLBoolean (GLAPIENTRY *PFN_eglSurfaceAttrib)( EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglSwapBuffers)( EGLDisplay dpy, EGLSurface surface ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglSwapInterval)( EGLDisplay dpy, EGLint interval ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglTerminate)( EGLDisplay dpy ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglWaitClient)(void); +typedef EGLBoolean (GLAPIENTRY *PFN_eglWaitGL)(void); +typedef EGLBoolean (GLAPIENTRY *PFN_eglWaitNative)( EGLint engine ); +typedef EGLBoolean (GLAPIENTRY *PFN_eglWaitSync)( EGLDisplay dpy, EGLSync sync, EGLint flags ); typedef void (GLAPIENTRY *PFN_glAccum)( GLenum op, GLfloat value ); typedef void (GLAPIENTRY *PFN_glAlphaFunc)( GLenum func, GLfloat ref ); typedef GLboolean (GLAPIENTRY *PFN_glAreTexturesResident)( GLsizei n, const GLuint *textures, GLboolean *residences ); @@ -8693,6 +8979,54 @@ typedef BOOL (GLAPIENTRY *PFN_wglSwapIntervalEXT)( int interval ); USE_GL_FUNC(wglSetPixelFormatWINE) \ USE_GL_FUNC(wglSwapIntervalEXT)
+#define ALL_EGL_FUNCS \ + USE_GL_FUNC(eglBindAPI) \ + USE_GL_FUNC(eglBindTexImage) \ + USE_GL_FUNC(eglChooseConfig) \ + USE_GL_FUNC(eglClientWaitSync) \ + USE_GL_FUNC(eglCopyBuffers) \ + USE_GL_FUNC(eglCreateContext) \ + USE_GL_FUNC(eglCreateImage) \ + USE_GL_FUNC(eglCreatePbufferFromClientBuffer) \ + USE_GL_FUNC(eglCreatePbufferSurface) \ + USE_GL_FUNC(eglCreatePixmapSurface) \ + USE_GL_FUNC(eglCreatePlatformPixmapSurface) \ + USE_GL_FUNC(eglCreatePlatformWindowSurface) \ + USE_GL_FUNC(eglCreateSync) \ + USE_GL_FUNC(eglCreateWindowSurface) \ + USE_GL_FUNC(eglDestroyContext) \ + USE_GL_FUNC(eglDestroyImage) \ + USE_GL_FUNC(eglDestroySurface) \ + USE_GL_FUNC(eglDestroySync) \ + USE_GL_FUNC(eglGetConfigAttrib) \ + USE_GL_FUNC(eglGetConfigs) \ + USE_GL_FUNC(eglGetCurrentContext) \ + USE_GL_FUNC(eglGetCurrentDisplay) \ + USE_GL_FUNC(eglGetCurrentSurface) \ + USE_GL_FUNC(eglGetDisplay) \ + USE_GL_FUNC(eglGetError) \ + USE_GL_FUNC(eglGetPlatformDisplay) \ + USE_GL_FUNC(eglGetProcAddress) \ + USE_GL_FUNC(eglGetSyncAttrib) \ + USE_GL_FUNC(eglInitialize) \ + USE_GL_FUNC(eglMakeCurrent) \ + USE_GL_FUNC(eglQueryAPI) \ + USE_GL_FUNC(eglQueryContext) \ + USE_GL_FUNC(eglQueryString) \ + USE_GL_FUNC(eglQuerySurface) \ + USE_GL_FUNC(eglReleaseTexImage) \ + USE_GL_FUNC(eglReleaseThread) \ + USE_GL_FUNC(eglSurfaceAttrib) \ + USE_GL_FUNC(eglSwapBuffers) \ + USE_GL_FUNC(eglSwapInterval) \ + USE_GL_FUNC(eglTerminate) \ + USE_GL_FUNC(eglWaitClient) \ + USE_GL_FUNC(eglWaitGL) \ + USE_GL_FUNC(eglWaitNative) \ + USE_GL_FUNC(eglWaitSync) + +#define ALL_EGL_EXT_FUNCS + #define ALL_GL_FUNCS \ USE_GL_FUNC(glAccum) \ USE_GL_FUNC(glAlphaFunc) \