Why eglGetDisplay(EGL_DEFAULT_DISPLAY) returns EGL_NO_DISPLAY?
Pekka Paalanen
ppaalanen at gmail.com
Sun Dec 29 09:57:37 UTC 2019
On Sat, 21 Dec 2019 02:05:59 +0900
TAEHO NAM <kl0ud3v at gmail.com> wrote:
> Hi, I'm new to dri-devel and sorry if this question doesn't fit here.
> In my code, the case 1 of getting eglDisplay using EGL_DEFAULT_DISPLAY
> failed, but, the case 2 succeeded.
>
> // Case 1
> egl_.display = eglGetDisplay (EGL_DEFAULT_DISPLAY);
>
> // Case 2
> struct gbm_device * gbm_device_;
> gbm_device_ = gbm_create_device (drm _-> GetFD ());
> egl_.display = eglGetDisplay ((EGLNativeDisplayType) gbm_device_);
>
> I don't know if EGL_DEFAULT_DISPLAY is missing or it's a problem with my
> machine.
> The output of lspci is :
>
> VGA compatible controller: Intel Corporation Device 5906 (rev 02)
>
> Thank you for any comments or links to related documents.
Hi,
please use the API that comes with
https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_platform_base.txt
and the related platform extensions for each particular platform.
I'm not sure if your issue comes from this, but without these the
EGL implementation cannot now what platform EGL_DEFAULT_DISPLAY
should refer to. It might as well be attempting to connect to an
X11 server instead of realizing you actually wanted to use GBM and
not X11.
See also
https://www.khronos.org/registry/EGL/extensions/MESA/EGL_MESA_platform_gbm.txt
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20191229/0250ac79/attachment.sig>
More information about the dri-devel
mailing list