From a2f80740d7a935549a75962be8e6831854a00e97 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Fri, 26 Jun 2020 12:43:49 +0200 Subject: [PATCH] Remove EGL and OSMesa struct member macros From upstream: https://github.com/glfw/glfw/commit/bcb85581896910c7205596cc4eec9b16d8b7e565. --- glfw/cocoa_platform.h | 2 -- glfw/egl_context.h | 4 ---- glfw/internal.h | 11 +++++++---- glfw/null_platform.h | 2 -- glfw/osmesa_context.h | 4 ---- glfw/wl_platform.h | 2 -- glfw/x11_platform.h | 2 -- 7 files changed, 7 insertions(+), 20 deletions(-) diff --git a/glfw/cocoa_platform.h b/glfw/cocoa_platform.h index f2a218ec5..ec2d0d87a 100644 --- a/glfw/cocoa_platform.h +++ b/glfw/cocoa_platform.h @@ -96,8 +96,6 @@ typedef VkResult (APIENTRY *PFN_vkCreateMetalSurfaceEXT)(VkInstance,const VkMeta #include "posix_thread.h" #include "cocoa_joystick.h" #include "nsgl_context.h" -#include "egl_context.h" -#include "osmesa_context.h" #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL) #define _glfw_dlclose(handle) dlclose(handle) diff --git a/glfw/egl_context.h b/glfw/egl_context.h index f6a80a987..c7999e42f 100644 --- a/glfw/egl_context.h +++ b/glfw/egl_context.h @@ -147,10 +147,6 @@ typedef EGLSurface (EGLAPIENTRY * PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)(EGLD #define eglGetPlatformDisplayEXT _glfw.egl.GetPlatformDisplayEXT #define eglCreatePlatformWindowSurfaceEXT _glfw.egl.CreatePlatformWindowSurfaceEXT -#define _GLFW_EGL_CONTEXT_STATE _GLFWcontextEGL egl -#define _GLFW_EGL_LIBRARY_CONTEXT_STATE _GLFWlibraryEGL egl - - // EGL-specific per-context data // typedef struct _GLFWcontextEGL diff --git a/glfw/internal.h b/glfw/internal.h index 784a0105f..e61bb2da6 100644 --- a/glfw/internal.h +++ b/glfw/internal.h @@ -198,6 +198,9 @@ typedef void (APIENTRY * PFN_vkVoidFunction)(void); #error "No supported window creation API selected" #endif +#include "egl_context.h" +#include "osmesa_context.h" + #define remove_i_from_array(array, i, count) { \ (count)--; \ if ((i) < (count)) { \ @@ -392,9 +395,9 @@ struct _GLFWcontext // This is defined in the context API's context.h _GLFW_PLATFORM_CONTEXT_STATE // This is defined in egl_context.h - _GLFW_EGL_CONTEXT_STATE; + _GLFWcontextEGL egl; // This is defined in osmesa_context.h - _GLFW_OSMESA_CONTEXT_STATE; + _GLFWcontextOSMesa osmesa; }; // Window and context structure @@ -613,9 +616,9 @@ struct _GLFWlibrary // This is defined in the platform's joystick.h _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE // This is defined in egl_context.h - _GLFW_EGL_LIBRARY_CONTEXT_STATE; + _GLFWlibraryEGL egl; // This is defined in osmesa_context.h - _GLFW_OSMESA_LIBRARY_CONTEXT_STATE; + _GLFWlibraryOSMesa osmesa; }; // Global state shared between compilation units of GLFW diff --git a/glfw/null_platform.h b/glfw/null_platform.h index d03a83877..63c0b5065 100644 --- a/glfw/null_platform.h +++ b/glfw/null_platform.h @@ -35,8 +35,6 @@ #define _GLFW_PLATFORM_CURSOR_STATE #define _GLFW_PLATFORM_LIBRARY_CONTEXT_STATE -#include "egl_context.h" -#include "osmesa_context.h" #include "posix_time.h" #include "posix_thread.h" #include "null_joystick.h" diff --git a/glfw/osmesa_context.h b/glfw/osmesa_context.h index cf03c7916..62d9b92c7 100644 --- a/glfw/osmesa_context.h +++ b/glfw/osmesa_context.h @@ -54,10 +54,6 @@ typedef GLFWglproc (GLAPIENTRY * PFN_OSMesaGetProcAddress)(const char*); #define OSMesaGetDepthBuffer _glfw.osmesa.GetDepthBuffer #define OSMesaGetProcAddress _glfw.osmesa.GetProcAddress -#define _GLFW_OSMESA_CONTEXT_STATE _GLFWcontextOSMesa osmesa -#define _GLFW_OSMESA_LIBRARY_CONTEXT_STATE _GLFWlibraryOSMesa osmesa - - // OSMesa-specific per-context data // typedef struct _GLFWcontextOSMesa diff --git a/glfw/wl_platform.h b/glfw/wl_platform.h index 9a00ef3de..dcfa23b06 100644 --- a/glfw/wl_platform.h +++ b/glfw/wl_platform.h @@ -50,8 +50,6 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR #endif #include "backend_utils.h" #include "xkb_glfw.h" -#include "egl_context.h" -#include "osmesa_context.h" #include "wl_cursors.h" #include "wayland-xdg-shell-client-protocol.h" diff --git a/glfw/x11_platform.h b/glfw/x11_platform.h index 923b84dd1..eeb647552 100644 --- a/glfw/x11_platform.h +++ b/glfw/x11_platform.h @@ -153,8 +153,6 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(Vk #include "posix_thread.h" #include "glx_context.h" -#include "egl_context.h" -#include "osmesa_context.h" #if defined(__linux__) #include "linux_joystick.h" #else