SDL/include
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
..
begin_code.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
close_code.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_assert.h Fixed bug 5462 - debug trap update/fix of assembly for Apple devices 2021-01-14 14:34:24 -08:00
SDL_atomic.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_audio.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_bits.h simplify Watcom implementation of SDL_MostSignificantBitIndex32() 2021-01-04 03:00:10 +03:00
SDL_blendmode.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_clipboard.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config.h.cmake Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config.h.in Fixed bug 5461 - Add rewritten WSCONS driver for OpenBSD 2021-01-14 14:32:11 -08:00
SDL_config_android.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_iphoneos.h Fixed bug 5440 - MacCatalyst build failures 2021-01-03 10:32:55 -08:00
SDL_config_macosx.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_minimal.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_os2.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_pandora.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_psp.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_windows.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_winrt.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_config_wiz.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_copying.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_cpuinfo.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_egl.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_endian.h Use Clang/GCC builtins for SDL byteswapping functions 2021-01-04 19:51:56 -06:00
SDL_error.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_events.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_filesystem.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_gamecontroller.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_gesture.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_haptic.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_hints.h Add a hint for D3D9Ex to avoid having to choose at compile-time 2021-01-02 14:45:15 -06:00
SDL_joystick.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_keyboard.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_keycode.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_loadso.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_locale.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_log.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_main.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_messagebox.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_metal.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_misc.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_mouse.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_mutex.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_name.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_opengl.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_opengl_glext.h Don't have Windows headers define min/max, in case they're defined by application code 2019-09-11 15:08:37 -07:00
SDL_opengles.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_opengles2.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_opengles2_gl2.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengles2_gl2ext.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengles2_gl2platform.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_opengles2_khrplatform.h Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL_pixels.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_platform.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_power.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_quit.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_rect.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_render.h Add SDL_UpdateNVTexture() to update NV12/21 Texture (bug #5430) 2021-01-05 11:56:22 +01:00
SDL_revision.h revert files I didnt mean to commit! 2017-09-29 10:15:44 -07:00
SDL_rwops.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_scancode.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_sensor.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_shape.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_stdinc.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_surface.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_system.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_syswm.h Fixed bug 5451 - Can't create EGLSurface in Wayland from SDLWindow (no EGLNativeWindow pointer) 2021-01-14 14:42:53 -08:00
SDL_test.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_assert.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_common.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_compare.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_crc32.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_font.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_fuzzer.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_harness.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_images.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_log.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_md5.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_memory.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_test_random.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_thread.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_timer.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_touch.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_types.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_version.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_video.h Updated copyright for 2021 2021-01-02 10:25:38 -08:00
SDL_vulkan.h Fixed whitespace in SDL_vulkan.h 2020-06-02 16:59:54 -07:00