sdl2_frt/src/video
Sam Lantinga 6a342954e8 Fixed bug 5451 - Can't create EGLSurface in Wayland from SDLWindow (no EGLNativeWindow pointer)
sashikknox

In some cases, need create EGLWindow with SDLWindow. In X11 i can get pointer to NativeWindow from **struct SDL_SysWMinfo wmInfo**
```C++
struct SDL_SysWMinfo wmInfo;
SDL_GetWindowWMInfo(ptSDLWindow, &wmInfo)
#if defined(__unix__) && defined(SDL_VIDEO_DRIVER_X11)
nativeWindow=(EGLNativeWindowType)wmInfo.info.x11.window;
nativeDisplay=(EGLNativeDisplayType)wmInfo.info.x11.display;
#endif
```
than i can create EGLSurface
```
eglCreateWindowSurface(nativeDisplay, EGL_CONFIG, nativeWindow, SURFACE_ATTRIBUTES);
```
in Wayland i can do it with same way, just need pointer to **EGLWindow**, we already have pointer to **wl_display** from **SDL_sysWMInfo**, need add to **wl** struct in SDL_SysWMInfo another pointer to **struct wl_egl_window *egl_window;**. And in wayland backend, in function **Wayland_GetWindowWMInfo** return pointer to **egl_window** from **SDL_WindowData**
Now i use patched statically built SDL2 in port of Quake 2 GLES2 for SailfishOS (it use QtWayland):
link to SDL2 commit and changed string for patch:
- 6858a618cd
- b1e29e87b9/SDL2/src/video/wayland/SDL_waylandwindow.c (L463)

link to use in Quake2 port:
1. here i get pointer to EGLNativeWindowType:  6d94fedb1b/Engine/Sources/Compatibility/OpenGLES/EGLWrapper.c (L319)
2. then use it for create EGLSurface: 6d94fedb1b/Engine/Sources/Compatibility/OpenGLES/EGLWrapper.c (L391)
2021-01-14 14:42:53 -08:00
..
android Updated copyright for 2021 2021-01-02 10:25:38 -08:00
arm ARM: NEON assembly optimization for SDL_FillRect 2019-10-24 21:17:52 -04:00
cocoa Fixed bug 5449 - SDL_DROPFILE update mouse location of drop in Cocoa 2021-01-07 11:49:28 -08:00
directfb Updated copyright for 2021 2021-01-02 10:25:38 -08:00
dummy Updated copyright for 2021 2021-01-02 10:25:38 -08:00
emscripten Updated copyright for 2021 2021-01-02 10:25:38 -08:00
haiku Updated copyright for 2021 2021-01-02 10:25:38 -08:00
khronos Updated Vulkan headers to version 1.2.158 2020-10-24 10:46:18 -07:00
kmsdrm Fixed bug 5461 - Add rewritten WSCONS driver for OpenBSD 2021-01-14 14:32:11 -08:00
nacl Updated copyright for 2021 2021-01-02 10:25:38 -08:00
offscreen Updated copyright for 2021 2021-01-02 10:25:38 -08:00
os2 Updated copyright for 2021 2021-01-02 10:25:38 -08:00
pandora Updated copyright for 2021 2021-01-02 10:25:38 -08:00
psp Updated copyright for 2021 2021-01-02 10:25:38 -08:00
qnx Added events for dynamically connecting and disconnecting displays, with an iOS implementation 2020-10-08 16:42:20 -07:00
raspberry Updated copyright for 2021 2021-01-02 10:25:38 -08:00
uikit Updated copyright for 2021 2021-01-02 10:25:38 -08:00
vivante Updated copyright for 2021 2021-01-02 10:25:38 -08:00
wayland Fixed bug 5451 - Can't create EGLSurface in Wayland from SDLWindow (no EGLNativeWindow pointer) 2021-01-14 14:42:53 -08:00
windows video/windows: ANSI/UNICODE updates (cf. bug 5435): 2021-01-05 15:50:10 +03:00
winrt Updated copyright for 2021 2021-01-02 10:25:38 -08:00
x11 Updated copyright for 2021 2021-01-02 10:25:38 -08:00
yuv2rgb Added a single SDL_LEAN_AND_MEAN define to turn on minimal SDL builds 2020-01-23 01:00:52 -08:00
SDL_blit_0.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit_1.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit_A.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit_auto.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit_auto.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit_copy.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit_copy.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit_N.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit_slow.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit_slow.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_blit.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_bmp.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_clipboard.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_egl_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_egl.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_fillrect.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_pixels_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_pixels.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_rect_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_rect.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_RLEaccel_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_RLEaccel.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_shape_internals.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_shape.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_stretch.c SDL_stretch.c: compilation NEON on Windows 10 2021-01-03 15:24:47 +01:00
SDL_surface.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_sysvideo.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_video.c [KMS/DRM] Go back to the LEGACY interface only because using planes breaks compatibility with HW, so no advantage on using ATOMIC. 2021-01-08 18:57:12 +01:00
SDL_vulkan_internal.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_vulkan_utils.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_yuv_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_yuv.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
sdlgenblit.pl Updated copyright for 2021 2021-01-02 10:25:38 -08:00