mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-07 19:58:32 +09:00
[Feat] (MG_Impl/EGLImpl): expose surfaceless platform extensions
This commit is contained in:
@@ -382,7 +382,14 @@ namespace MobileGL::MG_Impl::EGLImpl {
|
||||
case EGL_CLIENT_APIS:
|
||||
return "OpenGL OpenGL_ES";
|
||||
case EGL_EXTENSIONS:
|
||||
return "";
|
||||
if (display == EGL_NO_DISPLAY) {
|
||||
return "EGL_EXT_client_extensions "
|
||||
"EGL_EXT_platform_base "
|
||||
"EGL_KHR_platform_base "
|
||||
"EGL_MESA_platform_surfaceless";
|
||||
}
|
||||
return "EGL_KHR_create_context "
|
||||
"EGL_MESA_platform_surfaceless";
|
||||
default:
|
||||
state->SetError(EGL_BAD_PARAMETER);
|
||||
return nullptr;
|
||||
|
||||
@@ -235,6 +235,14 @@ MOBILEGL_EGL_API EGLDisplay eglGetPlatformDisplay(EGLenum platform, void* native
|
||||
return MobileGL::MG_Impl::EGLImpl::GetPlatformDisplay(platform, native_display, attrib_list);
|
||||
}
|
||||
|
||||
MOBILEGL_EGL_API EGLDisplay eglGetPlatformDisplayEXT(EGLenum platform, void* native_display,
|
||||
const EGLint* attrib_list) {
|
||||
MGLOG_D("eglGetPlatformDisplayEXT(platform=%u, native_display=%p, attrib_list=%p)", platform, native_display,
|
||||
attrib_list);
|
||||
return MobileGL::MG_Impl::EGLImpl::GetPlatformDisplay(
|
||||
platform, native_display, reinterpret_cast<const EGLAttrib*>(attrib_list));
|
||||
}
|
||||
|
||||
MOBILEGL_EGL_API EGLSurface eglCreatePlatformWindowSurface(EGLDisplay dpy, EGLConfig config, void* native_window,
|
||||
const EGLAttrib* attrib_list) {
|
||||
MGLOG_D("eglCreatePlatformWindowSurface(dpy=%p, config=%p, native_window=%p, attrib_list=%p)", dpy, config,
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#endif
|
||||
|
||||
extern "C" EGLDisplay eglGetPlatformDisplayEXT(EGLenum platform, void* native_display, const EGLint* attrib_list);
|
||||
|
||||
#define GETPROC(name, var) \
|
||||
if (strcmp(#name, var) == 0) { \
|
||||
return (void*)name; \
|
||||
@@ -63,6 +65,7 @@ namespace MobileGL::MG_Impl {
|
||||
GETPROC(eglCreateImage, name);
|
||||
GETPROC(eglDestroyImage, name);
|
||||
GETPROC(eglGetPlatformDisplay, name);
|
||||
GETPROC(eglGetPlatformDisplayEXT, name);
|
||||
GETPROC(eglCreatePlatformWindowSurface, name);
|
||||
GETPROC(eglCreatePlatformPixmapSurface, name);
|
||||
GETPROC(eglWaitSync, name);
|
||||
|
||||
Reference in New Issue
Block a user