public class KHRDisplayReference extends java.lang.ObjectNative bindings to the KHR_display_reference extension.
The existing semantics of
EGLDisplayobject lifetimes work well for applications in which one module manages all EGL usage, and in which EGL displays are expected to remain available until application termination once they are instantiated. However, EGL does not provide reasonable semantics in the case where applications rely on toolkit libraries which use EGL independently from the application itself.
This issue can be solved by adding a per-
EGLDisplayreference counter which is incremented by
Initializecalls. Resource destruction can then be deferred until a corresponding number of
Terminatecalls is made. However, switching to this behavior universally could cause backwards incompatibility problems with existing applications that assume a single
eglTerminatewill immediately free resources regardless of how many times the display has been initialized.
We therefore must support both behaviors. A new attribute specified when the
EGLDisplayis obtained will indicate whether or not reference counting is enabled. If an application requests the
EGLDisplaymultiple times with different values for this attribute, two separate displays will be returned. The one potential drawaback is that these displays will have independent resource spaces, so objects allocated from one cannot be used by the other. However, the goal here is to support modules that access EGL independently. In such a use case, they are not likely to need to share resources with another module, particularly one that uses a different method for accessing the display.
Fields Modifier and Type Field Description
All Methods Static Methods Concrete Methods Modifier and Type Method Description
eglQueryDisplayAttribKHR(long dpy, int name, PointerBuffer value)
neglQueryDisplayAttribKHR(long dpy, int name, long value)
public static int neglQueryDisplayAttribKHR(long dpy, int name, long value)
public static boolean eglQueryDisplayAttribKHR(long dpy, int name, PointerBuffer value)