Class EXTDisplayAlloc
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:
- Applications that rely on toolkit libraries which use EGL independently from the application itself.
- Applications that use multiple native display objects with EGL and wish to completely release resources associated with EGLDisplay objects they no longer need.
- 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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intAccepted as an attribute in theattrib_listparameter ofGetPlatformDisplayand thenameparameter ofQueryDisplayAttribEXT. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleaneglDestroyDisplayEXT(long dpy) Destroys anEGLDisplayhandle.
-
Field Details
-
EGL_ALLOC_NEW_DISPLAY_EXT
public static final int EGL_ALLOC_NEW_DISPLAY_EXTAccepted as an attribute in theattrib_listparameter ofGetPlatformDisplayand thenameparameter ofQueryDisplayAttribEXT.- See Also:
-
-
Method Details
-
eglDestroyDisplayEXT
public static boolean eglDestroyDisplayEXT(long dpy) Destroys anEGLDisplayhandle.If
dpyis 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
dpyis destroyed, it is not valid to pass to any EGL function. Subsequent calls toGetPlatformDisplaymay re-use the EGLDisplay handle value for new displays.If
dpywas not created with theALLOC_NEW_DISPLAY_EXTattribute set toTRUE, then anBAD_ACCESSerror is generated.
-