diff --git a/src/egl_context.h b/src/egl_context.h index 4304369cd..fded86445 100644 --- a/src/egl_context.h +++ b/src/egl_context.h @@ -25,7 +25,35 @@ // //======================================================================== +#if defined(_GLFW_USE_EGLPLATFORM_H) #include +#elif defined(_GLFW_ANDROID) +#define EGLAPIENTRY +typedef void* EGLNativeDisplayType; +typedef struct ANativeWindow* EGLNativeWindowType; +#elif defined(_GLFW_WIN32) +#define EGLAPIENTRY __stdcall +typedef HDC EGLNativeDisplayType; +typedef HWND EGLNativeWindowType; +#elif defined(_GLFW_COCOA) +#define EGLAPIENTRY +typedef void* EGLNativeDisplayType; +typedef id EGLNativeWindowType; +#elif defined(_GLFW_X11) +#define EGLAPIENTRY +typedef Display* EGLNativeDisplayType; +typedef Window EGLNativeWindowType; +#elif defined(_GLFW_WAYLAND) +#define EGLAPIENTRY +typedef struct wl_display* EGLNativeDisplayType; +typedef struct wl_egl_window* EGLNativeWindowType; +#elif defined(_GLFW_MIR) +#define EGLAPIENTRY +typedef MirEGLNativeDisplayType EGLNativeDisplayType; +typedef MirEGLNativeWindowType EGLNativeWindowType; +#else +#error "No supported EGL platform selected" +#endif #define EGL_SUCCESS 0x3000 #define EGL_NOT_INITIALIZED 0x3001