Class KHRDisplayReference
- java.lang.Object
-
- org.lwjgl.egl.KHRDisplayReference
-
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 byInitializecalls. Resource destruction can then be deferred until a corresponding number ofTerminatecalls is made. However, switching to this behavior universally could cause backwards incompatibility problems with existing applications that assume a singleeglTerminatewill 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 theEGLDisplaymultiple 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_baseorEGL 1.5
-
-
Field Summary
Fields Modifier and Type Field Description static intEGL_TRACK_REFERENCES_KHRAccepted as an attribute in theattrib_listparameter ofGetPlatformDisplayand thenameparameter ofQueryDisplayAttribKHR.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleaneglQueryDisplayAttribKHR(long dpy, int name, org.lwjgl.PointerBuffer value)static intneglQueryDisplayAttribKHR(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_listparameter ofGetPlatformDisplayand thenameparameter ofQueryDisplayAttribKHR.- See Also:
- Constant Field Values
-
-