How can I set _EGLDisplay->PlatformDisplay in client code?

36 Views Asked by At

My code:

EGLDisplay egl_display;
EGLConfig egl_config;
EGLContext egl_context;

egl_display = eglGetPlatformDisplayEXT(EGL_PLATFORM_WAYLAND_EXT, display, NULL);
if (egl_display == EGL_NO_DISPLAY) {
    fprintf(stderr, "Failed to create EGL display\n");
    goto error;
}

egl_display.PlatformDisplay = display; //compiler error

if (eglInitialize(egl_display, NULL, NULL) == EGL_FALSE) {
  fprintf(stderr, "Failed to initialize EGL\n");
  goto error;
}

EGLDisplay is void* and is cast to the _EGLDisplay(_egl_display) structure in the eglInitialize function. How do I set egl_display.PlatformDisplay = display if _EGLDisplay(_egl_display) are internal mesa structures and not in header files?

Thank you.

0

There are 0 best solutions below