creating no.of display ids for eglgetdisplay

968 views Asked by At

currently iam creating display for my opengl application by caling eglgetdisplay with the parameter EGL_DEFAULT_DISPLAY. if want to create more than one display in that case which parameter i can pass through eglgetdisplay becoz if with EGL_DEFAULT_DISPLAY it will get default id.

1

There are 1 answers

0
ghosthand On

A display corresponds to a physical screen which is the default display. Whenever eglGetDisplay() is called with EGL_DEFAULT_DISPLAY display type, a connection to this default display is returned. One will obtain connection to same default display even when such call is made in different applications because there is only one default display.

If you working on X11 or Wayland windowing system then EGL_PLATFORM_X11_SCREEN_KHR, KHR_platform_wayland extensions allow to obtain corresponding display. In that case eglGetPlatformDisplay() with parameter EGL_PLATFORM_X11_KHR or EGL_PLATFORM_WAYLAND_KHR will return corresponding display connections.

Please look at the extensions:
https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_platform_x11.txt
https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_platform_wayland.txt