mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 06:03:09 +00:00
EGL: Use EGL_EXT_platform_base whenever possible
This avoids any assumption from the driver, which would otherwise select a specific platform and potentially mess up everything, resulting usually in a display server failure.
This commit is contained in:
parent
705b7a0b0b
commit
8f69f29694
@ -33,10 +33,22 @@
|
||||
#ifdef EGL_ENABLED
|
||||
|
||||
#if defined(EGL_STATIC)
|
||||
#define KHRONOS_STATIC 1
|
||||
|
||||
#define GLAD_EGL_VERSION_1_5 true
|
||||
|
||||
#ifdef EGL_EXT_platform_base
|
||||
#define GLAD_EGL_EXT_platform_base 1
|
||||
#endif
|
||||
|
||||
#define KHRONOS_STATIC 1
|
||||
extern "C" EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
|
||||
extern "C" EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform, void *native_display, const EGLint *attrib_list);
|
||||
#undef KHRONOS_STATIC
|
||||
|
||||
#endif // defined(EGL_STATIC)
|
||||
|
||||
#ifndef EGL_EXT_platform_base
|
||||
#define GLAD_EGL_EXT_platform_base 0
|
||||
#endif
|
||||
|
||||
// Creates and caches a GLDisplay. Returns -1 on error.
|
||||
@ -56,10 +68,23 @@ int EGLManager::_get_gldisplay_id(void *p_display) {
|
||||
if (GLAD_EGL_VERSION_1_5) {
|
||||
Vector<EGLAttrib> attribs = _get_platform_display_attributes();
|
||||
new_gldisplay.egl_display = eglGetPlatformDisplay(_get_platform_extension_enum(), new_gldisplay.display, (attribs.size() > 0) ? attribs.ptr() : nullptr);
|
||||
} else if (GLAD_EGL_EXT_platform_base) {
|
||||
#ifdef EGL_EXT_platform_base
|
||||
// eglGetPlatformDisplayEXT wants its attributes as EGLint, so we'll truncate
|
||||
// what we already have. It's a bit naughty but I'm really not sure what else
|
||||
// we could do here.
|
||||
Vector<EGLint> attribs;
|
||||
for (const EGLAttrib &attrib : _get_platform_display_attributes()) {
|
||||
attribs.push_back((EGLint)attrib);
|
||||
}
|
||||
|
||||
new_gldisplay.egl_display = eglGetPlatformDisplayEXT(_get_platform_extension_enum(), new_gldisplay.display, (attribs.size() > 0) ? attribs.ptr() : nullptr);
|
||||
#endif // EGL_EXT_platform_base
|
||||
} else {
|
||||
NativeDisplayType *native_display_type = (NativeDisplayType *)new_gldisplay.display;
|
||||
new_gldisplay.egl_display = eglGetDisplay(*native_display_type);
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_V(eglGetError() != EGL_SUCCESS, -1);
|
||||
|
||||
ERR_FAIL_COND_V_MSG(new_gldisplay.egl_display == EGL_NO_DISPLAY, -1, "Can't create an EGL display.");
|
||||
@ -326,30 +351,51 @@ EGLContext EGLManager::get_context(DisplayServer::WindowID p_window_id) {
|
||||
return display.egl_context;
|
||||
}
|
||||
|
||||
Error EGLManager::initialize() {
|
||||
Error EGLManager::initialize(void *p_native_display) {
|
||||
#if defined(GLAD_ENABLED) && !defined(EGL_STATIC)
|
||||
// Passing a null display loads just the bare minimum to create one. We'll have
|
||||
// to create a temporary test display and reload EGL with it to get a good idea
|
||||
// of what version is supported on this machine. Currently we're looking for
|
||||
// 1.5, the latest at the time of writing, which is actually pretty old.
|
||||
if (!gladLoaderLoadEGL(nullptr)) {
|
||||
// Loading EGL with a new display gets us just the bare minimum API. We'll then
|
||||
// have to temporarily get a proper display and reload EGL once again to
|
||||
// initialize everything else.
|
||||
if (!gladLoaderLoadEGL(EGL_NO_DISPLAY)) {
|
||||
ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "Can't load EGL.");
|
||||
}
|
||||
|
||||
// NOTE: EGL_DEFAULT_DISPLAY returns whatever the O.S. deems suitable. I have
|
||||
// no idea if this may cause problems with multiple display servers and if we
|
||||
// should handle different EGL contexts in another way.
|
||||
EGLDisplay tmp_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
ERR_FAIL_COND_V(tmp_display == EGL_NO_DISPLAY, ERR_UNAVAILABLE);
|
||||
EGLDisplay tmp_display = EGL_NO_DISPLAY;
|
||||
|
||||
if (GLAD_EGL_EXT_platform_base) {
|
||||
#ifdef EGL_EXT_platform_base
|
||||
// eglGetPlatformDisplayEXT wants its attributes as EGLint.
|
||||
Vector<EGLint> attribs;
|
||||
for (const EGLAttrib &attrib : _get_platform_display_attributes()) {
|
||||
attribs.push_back((EGLint)attrib);
|
||||
}
|
||||
tmp_display = eglGetPlatformDisplayEXT(_get_platform_extension_enum(), p_native_display, attribs.ptr());
|
||||
#endif // EGL_EXT_platform_base
|
||||
} else {
|
||||
WARN_PRINT("EGL: EGL_EXT_platform_base not found during init, using default platform.");
|
||||
EGLNativeDisplayType *native_display_type = (EGLNativeDisplayType *)p_native_display;
|
||||
tmp_display = eglGetDisplay(*native_display_type);
|
||||
}
|
||||
|
||||
if (tmp_display == EGL_NO_DISPLAY) {
|
||||
eglTerminate(tmp_display);
|
||||
ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "Can't get a valid initial EGL display.");
|
||||
}
|
||||
|
||||
eglInitialize(tmp_display, nullptr, nullptr);
|
||||
|
||||
int version = gladLoaderLoadEGL(tmp_display);
|
||||
if (!version) {
|
||||
eglTerminate(tmp_display);
|
||||
ERR_FAIL_V_MSG(ERR_UNAVAILABLE, "Can't load EGL.");
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!version, ERR_UNAVAILABLE, "Can't load EGL.");
|
||||
print_verbose(vformat("Loaded EGL %d.%d", GLAD_VERSION_MAJOR(version), GLAD_VERSION_MINOR(version)));
|
||||
int major = GLAD_VERSION_MAJOR(version);
|
||||
int minor = GLAD_VERSION_MINOR(version);
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!GLAD_EGL_VERSION_1_4, ERR_UNAVAILABLE, "EGL version is too old!");
|
||||
print_verbose(vformat("Loaded EGL %d.%d", major, minor));
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!GLAD_EGL_VERSION_1_4, ERR_UNAVAILABLE, vformat("EGL version is too old! %d.%d < 1.4", major, minor));
|
||||
|
||||
eglTerminate(tmp_display);
|
||||
#endif
|
||||
@ -378,14 +424,15 @@ Error EGLManager::initialize() {
|
||||
}
|
||||
#endif
|
||||
|
||||
String extensions_string = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
|
||||
// The above method should always work. If it doesn't, something's very wrong.
|
||||
ERR_FAIL_COND_V(eglGetError() != EGL_SUCCESS, ERR_BUG);
|
||||
String client_extensions_string = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
|
||||
|
||||
// If the above method fails, we don't support client extensions, so there's nothing to check.
|
||||
if (eglGetError() == EGL_SUCCESS) {
|
||||
const char *platform = _get_platform_extension_name();
|
||||
if (!extensions_string.split(" ").has(platform)) {
|
||||
if (!client_extensions_string.split(" ").has(platform)) {
|
||||
ERR_FAIL_V_MSG(ERR_UNAVAILABLE, vformat("EGL platform extension \"%s\" not found.", platform));
|
||||
}
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
|
||||
EGLContext get_context(DisplayServer::WindowID p_window_id);
|
||||
|
||||
Error initialize();
|
||||
Error initialize(void *p_native_display = nullptr);
|
||||
|
||||
EGLManager();
|
||||
virtual ~EGLManager();
|
||||
|
@ -38,15 +38,6 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef GLAD_ENABLED
|
||||
#include "thirdparty/glad/glad/egl.h"
|
||||
#include "thirdparty/glad/glad/gl.h"
|
||||
#else
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#include <GL/glcorearb.h>
|
||||
#endif // GLAD_ENABLED
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -57,7 +48,7 @@
|
||||
#undef glGetString
|
||||
|
||||
// Runs inside a child. Exiting will not quit the engine.
|
||||
void DetectPrimeEGL::create_context() {
|
||||
void DetectPrimeEGL::create_context(EGLenum p_platform_enum) {
|
||||
#if defined(GLAD_ENABLED)
|
||||
if (!gladLoaderLoadEGL(nullptr)) {
|
||||
print_verbose("Unable to load EGL, GPU detection skipped.");
|
||||
@ -65,7 +56,18 @@ void DetectPrimeEGL::create_context() {
|
||||
}
|
||||
#endif
|
||||
|
||||
EGLDisplay egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
EGLDisplay egl_display = EGL_NO_DISPLAY;
|
||||
|
||||
if (GLAD_EGL_VERSION_1_5) {
|
||||
egl_display = eglGetPlatformDisplay(p_platform_enum, nullptr, nullptr);
|
||||
} else if (GLAD_EGL_EXT_platform_base) {
|
||||
#ifdef EGL_EXT_platform_base
|
||||
egl_display = eglGetPlatformDisplayEXT(p_platform_enum, nullptr, nullptr);
|
||||
#endif
|
||||
} else {
|
||||
egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
}
|
||||
|
||||
EGLConfig egl_config;
|
||||
EGLContext egl_context = EGL_NO_CONTEXT;
|
||||
|
||||
@ -110,7 +112,7 @@ void DetectPrimeEGL::create_context() {
|
||||
eglMakeCurrent(egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, egl_context);
|
||||
}
|
||||
|
||||
int DetectPrimeEGL::detect_prime() {
|
||||
int DetectPrimeEGL::detect_prime(EGLenum p_platform_enum) {
|
||||
pid_t p;
|
||||
int priorities[4] = {};
|
||||
String vendors[4];
|
||||
@ -168,7 +170,7 @@ int DetectPrimeEGL::detect_prime() {
|
||||
|
||||
setenv("DRI_PRIME", itos(i).utf8().ptr(), 1);
|
||||
|
||||
create_context();
|
||||
create_context(p_platform_enum);
|
||||
|
||||
PFNGLGETSTRINGPROC glGetString = (PFNGLGETSTRINGPROC)eglGetProcAddress("glGetString");
|
||||
const char *vendor = (const char *)glGetString(GL_VENDOR);
|
||||
|
@ -34,6 +34,30 @@
|
||||
#ifdef GLES3_ENABLED
|
||||
#ifdef EGL_ENABLED
|
||||
|
||||
#ifdef GLAD_ENABLED
|
||||
#include "thirdparty/glad/glad/egl.h"
|
||||
#include "thirdparty/glad/glad/gl.h"
|
||||
#else
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#include <GL/glcorearb.h>
|
||||
|
||||
#define GLAD_EGL_VERSION_1_5 1
|
||||
|
||||
#ifdef EGL_EXT_platform_base
|
||||
#define GLAD_EGL_EXT_platform_base 1
|
||||
#endif
|
||||
|
||||
#define KHRONOS_STATIC 1
|
||||
extern "C" EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform, void *native_display, const EGLint *attrib_list);
|
||||
#undef KHRONOS_STATIC
|
||||
|
||||
#endif // GLAD_ENABLED
|
||||
|
||||
#ifndef EGL_EXT_platform_base
|
||||
#define GLAD_EGL_EXT_platform_base 0
|
||||
#endif
|
||||
|
||||
class DetectPrimeEGL {
|
||||
private:
|
||||
struct Vendor {
|
||||
@ -53,10 +77,10 @@ private:
|
||||
{ nullptr, 0 }
|
||||
};
|
||||
|
||||
static void create_context();
|
||||
static void create_context(EGLenum p_platform_enum);
|
||||
|
||||
public:
|
||||
static int detect_prime();
|
||||
static int detect_prime(EGLenum p_platform_enum);
|
||||
};
|
||||
|
||||
#endif // GLES3_ENABLED
|
||||
|
@ -1343,7 +1343,7 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win
|
||||
|
||||
if (prime_idx == -1) {
|
||||
print_verbose("Detecting GPUs, set DRI_PRIME in the environment to override GPU detection logic.");
|
||||
prime_idx = DetectPrimeEGL::detect_prime();
|
||||
prime_idx = DetectPrimeEGL::detect_prime(EGL_PLATFORM_WAYLAND_KHR);
|
||||
}
|
||||
|
||||
if (prime_idx) {
|
||||
@ -1356,7 +1356,7 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win
|
||||
if (rendering_driver == "opengl3") {
|
||||
egl_manager = memnew(EGLManagerWayland);
|
||||
|
||||
if (egl_manager->initialize() != OK || egl_manager->open_display(wayland_thread.get_wl_display()) != OK) {
|
||||
if (egl_manager->initialize(wayland_thread.get_wl_display()) != OK || egl_manager->open_display(wayland_thread.get_wl_display()) != OK) {
|
||||
memdelete(egl_manager);
|
||||
egl_manager = nullptr;
|
||||
|
||||
@ -1376,7 +1376,7 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win
|
||||
if (rendering_driver == "opengl3_es") {
|
||||
egl_manager = memnew(EGLManagerWaylandGLES);
|
||||
|
||||
if (egl_manager->initialize() != OK) {
|
||||
if (egl_manager->initialize(wayland_thread.get_wl_display()) != OK) {
|
||||
memdelete(egl_manager);
|
||||
egl_manager = nullptr;
|
||||
r_error = ERR_CANT_CREATE;
|
||||
|
6
thirdparty/glad/EGL/eglplatform.h
vendored
6
thirdparty/glad/EGL/eglplatform.h
vendored
@ -64,6 +64,12 @@ typedef HDC EGLNativeDisplayType;
|
||||
typedef HBITMAP EGLNativePixmapType;
|
||||
typedef HWND EGLNativeWindowType;
|
||||
|
||||
#elif defined(__QNX__)
|
||||
|
||||
typedef khronos_uintptr_t EGLNativeDisplayType;
|
||||
typedef struct _screen_pixmap* EGLNativePixmapType; /* screen_pixmap_t */
|
||||
typedef struct _screen_window* EGLNativeWindowType; /* screen_window_t */
|
||||
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
|
||||
typedef int EGLNativeDisplayType;
|
||||
|
12
thirdparty/glad/egl.c
vendored
12
thirdparty/glad/egl.c
vendored
@ -30,6 +30,7 @@ int GLAD_EGL_VERSION_1_3 = 0;
|
||||
int GLAD_EGL_VERSION_1_4 = 0;
|
||||
int GLAD_EGL_VERSION_1_5 = 0;
|
||||
int GLAD_EGL_ANDROID_blob_cache = 0;
|
||||
int GLAD_EGL_EXT_platform_base = 0;
|
||||
int GLAD_EGL_KHR_platform_wayland = 0;
|
||||
int GLAD_EGL_KHR_platform_x11 = 0;
|
||||
|
||||
@ -46,7 +47,9 @@ PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC glad_eglCreatePbufferFromClientBuffer =
|
||||
PFNEGLCREATEPBUFFERSURFACEPROC glad_eglCreatePbufferSurface = NULL;
|
||||
PFNEGLCREATEPIXMAPSURFACEPROC glad_eglCreatePixmapSurface = NULL;
|
||||
PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC glad_eglCreatePlatformPixmapSurface = NULL;
|
||||
PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC glad_eglCreatePlatformPixmapSurfaceEXT = NULL;
|
||||
PFNEGLCREATEPLATFORMWINDOWSURFACEPROC glad_eglCreatePlatformWindowSurface = NULL;
|
||||
PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC glad_eglCreatePlatformWindowSurfaceEXT = NULL;
|
||||
PFNEGLCREATESYNCPROC glad_eglCreateSync = NULL;
|
||||
PFNEGLCREATEWINDOWSURFACEPROC glad_eglCreateWindowSurface = NULL;
|
||||
PFNEGLDESTROYCONTEXTPROC glad_eglDestroyContext = NULL;
|
||||
@ -61,6 +64,7 @@ PFNEGLGETCURRENTSURFACEPROC glad_eglGetCurrentSurface = NULL;
|
||||
PFNEGLGETDISPLAYPROC glad_eglGetDisplay = NULL;
|
||||
PFNEGLGETERRORPROC glad_eglGetError = NULL;
|
||||
PFNEGLGETPLATFORMDISPLAYPROC glad_eglGetPlatformDisplay = NULL;
|
||||
PFNEGLGETPLATFORMDISPLAYEXTPROC glad_eglGetPlatformDisplayEXT = NULL;
|
||||
PFNEGLGETPROCADDRESSPROC glad_eglGetProcAddress = NULL;
|
||||
PFNEGLGETSYNCATTRIBPROC glad_eglGetSyncAttrib = NULL;
|
||||
PFNEGLINITIALIZEPROC glad_eglInitialize = NULL;
|
||||
@ -145,6 +149,12 @@ static void glad_egl_load_EGL_ANDROID_blob_cache( GLADuserptrloadfunc load, void
|
||||
if(!GLAD_EGL_ANDROID_blob_cache) return;
|
||||
glad_eglSetBlobCacheFuncsANDROID = (PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) load(userptr, "eglSetBlobCacheFuncsANDROID");
|
||||
}
|
||||
static void glad_egl_load_EGL_EXT_platform_base( GLADuserptrloadfunc load, void* userptr) {
|
||||
if(!GLAD_EGL_EXT_platform_base) return;
|
||||
glad_eglCreatePlatformPixmapSurfaceEXT = (PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) load(userptr, "eglCreatePlatformPixmapSurfaceEXT");
|
||||
glad_eglCreatePlatformWindowSurfaceEXT = (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) load(userptr, "eglCreatePlatformWindowSurfaceEXT");
|
||||
glad_eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC) load(userptr, "eglGetPlatformDisplayEXT");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -183,6 +193,7 @@ static int glad_egl_find_extensions_egl(EGLDisplay display) {
|
||||
if (!glad_egl_get_extensions(display, &extensions)) return 0;
|
||||
|
||||
GLAD_EGL_ANDROID_blob_cache = glad_egl_has_extension(extensions, "EGL_ANDROID_blob_cache");
|
||||
GLAD_EGL_EXT_platform_base = glad_egl_has_extension(extensions, "EGL_EXT_platform_base");
|
||||
GLAD_EGL_KHR_platform_wayland = glad_egl_has_extension(extensions, "EGL_KHR_platform_wayland");
|
||||
GLAD_EGL_KHR_platform_x11 = glad_egl_has_extension(extensions, "EGL_KHR_platform_x11");
|
||||
|
||||
@ -248,6 +259,7 @@ int gladLoadEGLUserPtr(EGLDisplay display, GLADuserptrloadfunc load, void* userp
|
||||
|
||||
if (!glad_egl_find_extensions_egl(display)) return 0;
|
||||
glad_egl_load_EGL_ANDROID_blob_cache(load, userptr);
|
||||
glad_egl_load_EGL_EXT_platform_base(load, userptr);
|
||||
|
||||
|
||||
return version;
|
||||
|
21
thirdparty/glad/glad/egl.h
vendored
21
thirdparty/glad/glad/egl.h
vendored
@ -1,11 +1,11 @@
|
||||
/**
|
||||
* Loader generated by glad 2.0.3 on Fri Feb 3 07:06:48 2023
|
||||
* Loader generated by glad 2.0.6 on Sat Jun 1 18:07:46 2024
|
||||
*
|
||||
* SPDX-License-Identifier: (WTFPL OR CC0-1.0) AND Apache-2.0
|
||||
*
|
||||
* Generator: C/C++
|
||||
* Specification: egl
|
||||
* Extensions: 3
|
||||
* Extensions: 4
|
||||
*
|
||||
* APIs:
|
||||
* - egl=1.5
|
||||
@ -19,10 +19,10 @@
|
||||
* - ON_DEMAND = False
|
||||
*
|
||||
* Commandline:
|
||||
* --api='egl=1.5' --extensions='EGL_ANDROID_blob_cache,EGL_KHR_platform_wayland,EGL_KHR_platform_x11' c --loader
|
||||
* --api='egl=1.5' --extensions='EGL_ANDROID_blob_cache,EGL_EXT_platform_base,EGL_KHR_platform_wayland,EGL_KHR_platform_x11' c --loader
|
||||
*
|
||||
* Online:
|
||||
* http://glad.sh/#api=egl%3D1.5&extensions=EGL_ANDROID_blob_cache%2CEGL_KHR_platform_wayland%2CEGL_KHR_platform_x11&generator=c&options=LOADER
|
||||
* http://glad.sh/#api=egl%3D1.5&extensions=EGL_ANDROID_blob_cache%2CEGL_EXT_platform_base%2CEGL_KHR_platform_wayland%2CEGL_KHR_platform_x11&generator=c&options=LOADER
|
||||
*
|
||||
*/
|
||||
|
||||
@ -141,7 +141,7 @@ extern "C" {
|
||||
#define GLAD_VERSION_MAJOR(version) (version / 10000)
|
||||
#define GLAD_VERSION_MINOR(version) (version % 10000)
|
||||
|
||||
#define GLAD_GENERATOR_VERSION "2.0.3"
|
||||
#define GLAD_GENERATOR_VERSION "2.0.6"
|
||||
|
||||
typedef void (*GLADapiproc)(void);
|
||||
|
||||
@ -399,6 +399,8 @@ GLAD_API_CALL int GLAD_EGL_VERSION_1_4;
|
||||
GLAD_API_CALL int GLAD_EGL_VERSION_1_5;
|
||||
#define EGL_ANDROID_blob_cache 1
|
||||
GLAD_API_CALL int GLAD_EGL_ANDROID_blob_cache;
|
||||
#define EGL_EXT_platform_base 1
|
||||
GLAD_API_CALL int GLAD_EGL_EXT_platform_base;
|
||||
#define EGL_KHR_platform_wayland 1
|
||||
GLAD_API_CALL int GLAD_EGL_KHR_platform_wayland;
|
||||
#define EGL_KHR_platform_x11 1
|
||||
@ -416,7 +418,9 @@ typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC)(EGLDi
|
||||
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPBUFFERSURFACEPROC)(EGLDisplay dpy, EGLConfig config, const EGLint * attrib_list);
|
||||
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPIXMAPSURFACEPROC)(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint * attrib_list);
|
||||
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC)(EGLDisplay dpy, EGLConfig config, void * native_pixmap, const EGLAttrib * attrib_list);
|
||||
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC)(EGLDisplay dpy, EGLConfig config, void * native_pixmap, const EGLint * attrib_list);
|
||||
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPLATFORMWINDOWSURFACEPROC)(EGLDisplay dpy, EGLConfig config, void * native_window, const EGLAttrib * attrib_list);
|
||||
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)(EGLDisplay dpy, EGLConfig config, void * native_window, const EGLint * attrib_list);
|
||||
typedef EGLSync (GLAD_API_PTR *PFNEGLCREATESYNCPROC)(EGLDisplay dpy, EGLenum type, const EGLAttrib * attrib_list);
|
||||
typedef EGLSurface (GLAD_API_PTR *PFNEGLCREATEWINDOWSURFACEPROC)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint * attrib_list);
|
||||
typedef EGLBoolean (GLAD_API_PTR *PFNEGLDESTROYCONTEXTPROC)(EGLDisplay dpy, EGLContext ctx);
|
||||
@ -431,6 +435,7 @@ typedef EGLSurface (GLAD_API_PTR *PFNEGLGETCURRENTSURFACEPROC)(EGLint readdraw);
|
||||
typedef EGLDisplay (GLAD_API_PTR *PFNEGLGETDISPLAYPROC)(EGLNativeDisplayType display_id);
|
||||
typedef EGLint (GLAD_API_PTR *PFNEGLGETERRORPROC)(void);
|
||||
typedef EGLDisplay (GLAD_API_PTR *PFNEGLGETPLATFORMDISPLAYPROC)(EGLenum platform, void * native_display, const EGLAttrib * attrib_list);
|
||||
typedef EGLDisplay (GLAD_API_PTR *PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform, void * native_display, const EGLint * attrib_list);
|
||||
typedef __eglMustCastToProperFunctionPointerType (GLAD_API_PTR *PFNEGLGETPROCADDRESSPROC)(const char * procname);
|
||||
typedef EGLBoolean (GLAD_API_PTR *PFNEGLGETSYNCATTRIBPROC)(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib * value);
|
||||
typedef EGLBoolean (GLAD_API_PTR *PFNEGLINITIALIZEPROC)(EGLDisplay dpy, EGLint * major, EGLint * minor);
|
||||
@ -473,8 +478,12 @@ GLAD_API_CALL PFNEGLCREATEPIXMAPSURFACEPROC glad_eglCreatePixmapSurface;
|
||||
#define eglCreatePixmapSurface glad_eglCreatePixmapSurface
|
||||
GLAD_API_CALL PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC glad_eglCreatePlatformPixmapSurface;
|
||||
#define eglCreatePlatformPixmapSurface glad_eglCreatePlatformPixmapSurface
|
||||
GLAD_API_CALL PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC glad_eglCreatePlatformPixmapSurfaceEXT;
|
||||
#define eglCreatePlatformPixmapSurfaceEXT glad_eglCreatePlatformPixmapSurfaceEXT
|
||||
GLAD_API_CALL PFNEGLCREATEPLATFORMWINDOWSURFACEPROC glad_eglCreatePlatformWindowSurface;
|
||||
#define eglCreatePlatformWindowSurface glad_eglCreatePlatformWindowSurface
|
||||
GLAD_API_CALL PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC glad_eglCreatePlatformWindowSurfaceEXT;
|
||||
#define eglCreatePlatformWindowSurfaceEXT glad_eglCreatePlatformWindowSurfaceEXT
|
||||
GLAD_API_CALL PFNEGLCREATESYNCPROC glad_eglCreateSync;
|
||||
#define eglCreateSync glad_eglCreateSync
|
||||
GLAD_API_CALL PFNEGLCREATEWINDOWSURFACEPROC glad_eglCreateWindowSurface;
|
||||
@ -503,6 +512,8 @@ GLAD_API_CALL PFNEGLGETERRORPROC glad_eglGetError;
|
||||
#define eglGetError glad_eglGetError
|
||||
GLAD_API_CALL PFNEGLGETPLATFORMDISPLAYPROC glad_eglGetPlatformDisplay;
|
||||
#define eglGetPlatformDisplay glad_eglGetPlatformDisplay
|
||||
GLAD_API_CALL PFNEGLGETPLATFORMDISPLAYEXTPROC glad_eglGetPlatformDisplayEXT;
|
||||
#define eglGetPlatformDisplayEXT glad_eglGetPlatformDisplayEXT
|
||||
GLAD_API_CALL PFNEGLGETPROCADDRESSPROC glad_eglGetProcAddress;
|
||||
#define eglGetProcAddress glad_eglGetProcAddress
|
||||
GLAD_API_CALL PFNEGLGETSYNCATTRIBPROC glad_eglGetSyncAttrib;
|
||||
|
Loading…
Reference in New Issue
Block a user