eglGetDisplay/eglChooseDisplay, CreateContext

Jon Smirl jonsmirl at gmail.com
Sat Jul 9 00:07:00 EST 2005


In our model eglGetDisplay(display_name) opens a specific device. So
if I want to open three screens I need to do:
eglGetDisplay("display/0");
eglGetDisplay("display/1");
eglGetDisplay("display/2");

And I end up with three display handles.

With the X server if I XOpenDisplay() I get:
Display
     screen0
     screen1
     screen2

With EGL I could also get:
Display
     screen0
     screen1
Display
     screen0

So if I understand things right an EGL display is corresponding to an
X screen. And there is no equivalent to an X Display in EGL. There is
also no parallel for EGL screen in X.

Another area of confusion I'm having is glXCreateNewContext(display,
config). The display is not used in DRI code. Instead GLX configs are
bound to screens and the screen is determined from the config.

In eglCreateContext(display, config) my display corresponds to an X
screen and my config is not bound to a particular EGL screen. So why
does eglCreateContext() need config as a parameter?

-- 
Jon Smirl
jonsmirl at gmail.com


More information about the dri-egl mailing list