public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneable
Modifier and Type | Class and Description |
---|---|
static interface |
EGLGraphicsDevice.EGLDisplayLifecycleCallback
Hack to allow inject a EGL termination call.
|
DEBUG, DEFAULT_CONNECTION, DEFAULT_UNIT, EXTERNAL_CONNECTION
Constructor and Description |
---|
EGLGraphicsDevice()
Note that this is not an open connection, ie no native display handle exist.
|
EGLGraphicsDevice(long nativeDisplayID,
long eglDisplay,
String connection,
int unitID,
EGLGraphicsDevice.EGLDisplayLifecycleCallback eglLifecycleCallback) |
Modifier and Type | Method and Description |
---|---|
void |
clearHandleOwner() |
Object |
clone() |
boolean |
close()
Closes the EGL device if handle is not null and it's
EGLGraphicsDevice.EGLDisplayLifecycleCallback is valid. |
VersionNumber |
getEGLVersion()
EGL server version as returned by
eglInitialize(..) . |
long |
getNativeDisplayID() |
boolean |
isHandleOwner() |
boolean |
open()
Opens the EGL device if handle is null and it's
EGLGraphicsDevice.EGLDisplayLifecycleCallback is valid. |
String |
toString() |
getConnection, getHandle, getToolkitLock, getType, getUniqueID, getUnitID, lock, swapDeviceHandleAndOwnership, unlock, validateLocked
public EGLGraphicsDevice()
public EGLGraphicsDevice(long nativeDisplayID, long eglDisplay, String connection, int unitID, EGLGraphicsDevice.EGLDisplayLifecycleCallback eglLifecycleCallback)
public VersionNumber getEGLVersion()
eglInitialize(..)
. Only valid after open()
.public long getNativeDisplayID()
public Object clone()
clone
in interface AbstractGraphicsDevice
clone
in class DefaultGraphicsDevice
public boolean open()
EGLGraphicsDevice.EGLDisplayLifecycleCallback
is valid.
Optionally [re]opening the device if handle is null
.
The default implementation is a NOP
.
Example implementations like X11GraphicsDevice
or EGLGraphicsDevice
issue the native open operation in case handle is null
.
open
in interface AbstractGraphicsDevice
open
in class DefaultGraphicsDevice
null
and opening was successful, otherwise false.public boolean close()
EGLGraphicsDevice.EGLDisplayLifecycleCallback
is valid.
Optionally closing the device if handle is not null
.
The default implementation dispose
it's ToolkitLock
and sets the handle to null
.
Example implementations like X11GraphicsDevice
or EGLGraphicsDevice
issue the native close operation or skip it depending on the handles's ownership
.
close
in interface AbstractGraphicsDevice
close
in class DefaultGraphicsDevice
null
and closing was successful, otherwise false.public boolean isHandleOwner()
isHandleOwner
in interface AbstractGraphicsDevice
isHandleOwner
in class DefaultGraphicsDevice
true
if instance owns the handle to issue AbstractGraphicsDevice.close()
, otherwise false
.public void clearHandleOwner()
clearHandleOwner
in interface AbstractGraphicsDevice
clearHandleOwner
in class DefaultGraphicsDevice
public String toString()
toString
in class DefaultGraphicsDevice
Copyright 2010 JogAmp Community.