Class KHRDisplayReference
- java.lang.Object
-
- org.lwjgl.egl.KHRDisplayReference
-
public class KHRDisplayReference extends java.lang.Object
Native bindings to the KHR_display_reference 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 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-
EGLDisplay
reference counter which is incremented byInitialize
calls. Resource destruction can then be deferred until a corresponding number ofTerminate
calls is made. However, switching to this behavior universally could cause backwards incompatibility problems with existing applications that assume a singleeglTerminate
will 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
EGLDisplay
is obtained will indicate whether or not reference counting is enabled. If an application requests theEGLDisplay
multiple 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.Requires
EXT_platform_base
orEGL 1.5
-
-
Field Summary
Fields Modifier and Type Field Description static int
EGL_TRACK_REFERENCES_KHR
Accepted as an attribute in theattrib_list
parameter ofGetPlatformDisplay
and thename
parameter ofQueryDisplayAttribKHR
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
eglQueryDisplayAttribKHR(long dpy, int name, org.lwjgl.PointerBuffer value)
static int
neglQueryDisplayAttribKHR(long dpy, int name, long value)
-
-
-
Field Detail
-
EGL_TRACK_REFERENCES_KHR
public static final int EGL_TRACK_REFERENCES_KHR
Accepted as an attribute in theattrib_list
parameter ofGetPlatformDisplay
and thename
parameter ofQueryDisplayAttribKHR
.- See Also:
- Constant Field Values
-
-