Package org.lwjgl.egl

Class EXTDisplayAlloc

java.lang.Object
org.lwjgl.egl.EXTDisplayAlloc

public class EXTDisplayAlloc extends Object
Native bindings to the EXT_display_alloc extension.

The existing semantics of EGLDisplay object lifetimes work well for applications in which one module manages all EGL usage, and in which EGL displays and the underlying native displays are expected to remain available until application termination once they are instantiated. However, EGL does not provide reasonable semantics for the following use cases:

  1. Applications that rely on toolkit libraries which use EGL independently from the application itself.
  2. Applications that use multiple native display objects with EGL and wish to completely release resources associated with EGLDisplay objects they no longer need.
  3. Platforms where the native display connection can be closed, such as X11 or Wayland. If the native display is closed, then there's no possible reasonable behavior for an EGLDisplay.

This extension solves these problems by adding the ability to create multiple unique, unshared EGLDisplay objects from the same native display, and to destroy those EGLDisplay objects when the caller no longer needs them.

  • Field Details

  • Method Details

    • eglDestroyDisplayEXT

      public static boolean eglDestroyDisplayEXT(long dpy)
      Destroys an EGLDisplay handle.

      If dpy is initialized, or if it is current to one or more threads, then is is marked for deletion, and it will be destroyed when it is terminated and no longer current.

      After dpy is destroyed, it is not valid to pass to any EGL function. Subsequent calls to GetPlatformDisplay may re-use the EGLDisplay handle value for new displays.

      If dpy was not created with the ALLOC_NEW_DISPLAY_EXT attribute set to TRUE, then an BAD_ACCESS error is generated.