SDL/src
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
..
atomic Use specific acquire and release variants of InterlockedExchange on ARM 2021-01-03 12:13:40 -06:00
audio Fixed bug 5080 - SDL_netbsdaudio: Always use the device's preferred frequency 2021-01-08 10:09:37 -08:00
core Fixed bug 5461 - Add rewritten WSCONS driver for OpenBSD 2021-01-14 14:32:11 -08:00
cpuinfo Updated copyright for 2021 2021-01-02 10:25:38 -08:00
dynapi ran gendynapi.pl after SDL_UpdateNVTexture addition 2021-01-05 15:15:50 +03:00
events Fixed bug 5465 - Invalid memcpy inside SDL_GestureDelTouch (Thanks dmikushin and Yuki Okumura) 2021-01-10 22:21:12 +01:00
file Updated copyright for 2021 2021-01-02 10:25:38 -08:00
filesystem use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2) 2021-01-05 15:50:02 +03:00
haptic Updated copyright for 2021 2021-01-02 10:25:38 -08:00
hidapi Fixed building when SDL_LIBUSB_DYNAMIC is defined 2021-01-07 10:23:55 -08:00
joystick Don't blink the Xbox 360 LED when setting the player slot, it's probably already been set by a driver 2021-01-13 11:02:07 -08:00
libm Updated copyright for 2021 2021-01-02 10:25:38 -08:00
loadso Updated copyright for 2021 2021-01-02 10:25:38 -08:00
locale consistently use TEXT() macro with LoadLibrary() and GetModuleHandle() 2021-01-04 01:23:50 +03:00
main SDL_windows_main.c: use new WIN_StringToUTF8W macro 2021-01-04 10:20:10 +03:00
misc use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2) 2021-01-05 15:50:02 +03:00
power Updated copyright for 2021 2021-01-02 10:25:38 -08:00
render opengl: More work on making line drawing match software renderer. 2021-01-11 20:40:11 -05:00
sensor use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2) 2021-01-05 15:50:02 +03:00
stdlib Updated copyright for 2021 2021-01-02 10:25:38 -08:00
test Updated copyright for 2021 2021-01-02 10:25:38 -08:00
thread use WIN_StringToUTF8W instead of WIN_StringToUTF8 where needed (#2) 2021-01-05 15:50:02 +03:00
timer Updated copyright for 2021 2021-01-02 10:25:38 -08:00
video Fixed bug 5451 - Can't create EGLSurface in Wayland from SDLWindow (no EGLNativeWindow pointer) 2021-01-14 14:42:53 -08:00
SDL.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_assert.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_assert_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_dataqueue.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_dataqueue.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_error.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_error_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_hints.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_hints_c.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_internal.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_log.c Updated copyright for 2021 2021-01-02 10:25:38 -08:00