1Name 2 3 KHR_platform_haiku 4 5Name Strings 6 7 EGL_KHR_platform_haiku 8 9Contributors 10 11 Alexander von Gluck IV <alex@terarocket.io> 12 13Contacts 14 15 Alexander von Gluck IV <alex@terarocket.io> 16 17Status 18 19 Draft. 20 21Version 22 23 Version 1, 2023/03/29 24 25Number 26 27 EGL Extension TBD 28 29Extension Type 30 31 EGL client extension 32 33Dependencies 34 35 EGL 1.5 is required. 36 37 This extension is written against the EGL 1.5 Specification (draft 38 20140122). 39 40Overview 41 42 This extension defines how to create EGL resources from native Haiku 43 resources using the EGL 1.5 platform functionality. 44 45 Mesa has tracked _EGL_PLATFORM_HAIKU internally for quite some time. 46 47 libglvnd has received patches for basic Haiku support 48 49New Types 50 51 None 52 53New Procedures and Functions 54 55 None 56 57New Tokens 58 59 Accepted as the <platform> argument of eglGetPlatformDisplay: 60 61 EGL_PLATFORM_HAIKU_KHR 0x31D9 62 63Additions to the EGL Specification 64 65 None. 66 67New Behavior 68 69 To determine if the EGL implementation supports this extension, clients 70 should query the EGL_EXTENSIONS string of EGL_NO_DISPLAY. 71 72 To obtain an EGLDisplay backed by a Haiku display, call 73 eglGetPlatformDisplay with <platform> set to EGL_PLATFORM_HAIKU_KHR. The 74 <native_display> parameter specifies the Haiku display to use and must 75 either point to a `struct wl_display` or be EGL_DEFAULT_DISPLAY. If 76 <native_display> is EGL_DEFAULT_DISPLAY, then EGL will create a new 77 wl_display structure by connecting to the default Wayland socket. The 78 manual page wl_display_connect(3) defines the location of the default 79 Wayland socket. 80 81 To obtain an on-screen rendering surface from a Wayland window, call 82 eglCreatePlatformWindowSurface with a <dpy> that belongs to Wayland and 83 a <native_window> that points to a `struct wl_egl_surface`. 84 85 It is not valid to call eglCreatePlatformPixmapSurface with a <dpy> that 86 belongs to Haiku. Any such call fails and generates an 87 EGL_BAD_PARAMETER error. 88 89 Rendering to the obtained EGLSurface or querying it with EGL_BUFFER_AGE_KHR 90 will lock its back buffer preventing it from being dropped or resized, 91 until the next buffer swap. The rationale behind this behavior is to keep 92 operations result accurate until the next swap. 93 94Issues 95 96 TBD 97 98Revision History 99 Version 1, 2023/03/29 (Alexander von Gluck IV) 100 - Initial Draft version for Haiku with EGL 1.5+ 101