|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
A interface describing a graphics device in a toolkit-independent manner. More...
Public Member Functions | |
| Object | clone () |
| String | getType () |
| Returns the type of the underlying subsystem, ie NativeWindowFactory.TYPE_KD, NativeWindowFactory.TYPE_X11, . More... | |
| String | getConnection () |
| Returns the semantic GraphicsDevice connection. More... | |
| int | getUnitID () |
Returns the graphics device unit ID. More... | |
| String | getUniqueID () |
Returns a unique ID object of this device using type, connection and unitID as it's key components. More... | |
| long | getHandle () |
| Returns the native handle of the underlying native device, if such thing exist. More... | |
| void | lock () |
Optionally locking the device, utilizing eg com.jogamp.nativewindow.ToolkitLock#lock(). More... | |
| void | unlock () |
Optionally unlocking the device, utilizing eg com.jogamp.nativewindow.ToolkitLock#unlock(). More... | |
| void | validateLocked () throws RuntimeException |
| boolean | open () |
Optionally [re]opening the device if handle is null. More... | |
| boolean | close () |
Optionally closing the device if handle is not null. More... | |
| boolean | isHandleOwner () |
| void | clearHandleOwner () |
Static Public Attributes | |
| static final boolean | DEBUG = Debug.debug("GraphicsDevice") |
| static String | DEFAULT_CONNECTION = "decon" |
| Dummy connection value for a default connection where no native support for multiple devices is available. More... | |
| static String | EXTERNAL_CONNECTION = "excon" |
| Dummy connection value for an external connection where no native support for multiple devices is available. More... | |
| static int | DEFAULT_UNIT = 0 |
| Default unit id for the 1st device: 0. More... | |
A interface describing a graphics device in a toolkit-independent manner.
Definition at line 48 of file AbstractGraphicsDevice.java.
| void com.jogamp.nativewindow.AbstractGraphicsDevice.clearHandleOwner | ( | ) |
Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.
| Object com.jogamp.nativewindow.AbstractGraphicsDevice.clone | ( | ) |
Implemented in com.jogamp.nativewindow.awt.AWTGraphicsDevice, com.jogamp.nativewindow.DefaultGraphicsDevice, com.jogamp.nativewindow.egl.EGLGraphicsDevice, com.jogamp.nativewindow.ios.IOSGraphicsDevice, com.jogamp.nativewindow.macosx.MacOSXGraphicsDevice, com.jogamp.nativewindow.windows.WindowsGraphicsDevice, and com.jogamp.nativewindow.x11.X11GraphicsDevice.
| boolean com.jogamp.nativewindow.AbstractGraphicsDevice.close | ( | ) |
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 com.jogamp.nativewindow.x11.X11GraphicsDevice or com.jogamp.nativewindow.egl.EGLGraphicsDevice issue the native close operation or skip it depending on the handles's ownership.
null and closing was successful, otherwise false. Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice, com.jogamp.nativewindow.egl.EGLGraphicsDevice, and com.jogamp.nativewindow.x11.X11GraphicsDevice.
| String com.jogamp.nativewindow.AbstractGraphicsDevice.getConnection | ( | ) |
Returns the semantic GraphicsDevice connection.
On platforms supporting remote devices, eg via tcp/ip network, the implementation shall return a unique name for each remote address.
For X11GraphicsDevice, the connection string should be as the follows
:0.0 for a local connection remote.host.net:0.0 for a remote connection To support multiple local device, see getUnitID().
Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.
| long com.jogamp.nativewindow.AbstractGraphicsDevice.getHandle | ( | ) |
Returns the native handle of the underlying native device, if such thing exist.
Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.
| String com.jogamp.nativewindow.AbstractGraphicsDevice.getType | ( | ) |
Returns the type of the underlying subsystem, ie NativeWindowFactory.TYPE_KD, NativeWindowFactory.TYPE_X11, .
Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.
| String com.jogamp.nativewindow.AbstractGraphicsDevice.getUniqueID | ( | ) |
Returns a unique ID object of this device using type, connection and unitID as it's key components.
The unique ID does not reflect the instance of the device, hence the handle is not included. The unique ID may be used as a key for semantic device mapping.
The returned string object reference is unique using String#intern() and hence can be used as a key itself.
Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.
| int com.jogamp.nativewindow.AbstractGraphicsDevice.getUnitID | ( | ) |
Returns the graphics device unit ID.
The unit ID support multiple graphics device configurations on a local machine.
To support remote device, see getConnection().
Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.
| boolean com.jogamp.nativewindow.AbstractGraphicsDevice.isHandleOwner | ( | ) |
true if instance owns the handle to issue close(), otherwise false. Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.
| void com.jogamp.nativewindow.AbstractGraphicsDevice.lock | ( | ) |
Optionally locking the device, utilizing eg com.jogamp.nativewindow.ToolkitLock#lock().
The lock implementation must be recursive.
Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.
| boolean com.jogamp.nativewindow.AbstractGraphicsDevice.open | ( | ) |
Optionally [re]opening the device if handle is null.
The default implementation is a NOP.
Example implementations like com.jogamp.nativewindow.x11.X11GraphicsDevice or com.jogamp.nativewindow.egl.EGLGraphicsDevice issue the native open operation in case handle is null.
null and opening was successful, otherwise false. Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice, com.jogamp.nativewindow.egl.EGLGraphicsDevice, and com.jogamp.nativewindow.x11.X11GraphicsDevice.
| void com.jogamp.nativewindow.AbstractGraphicsDevice.unlock | ( | ) |
Optionally unlocking the device, utilizing eg com.jogamp.nativewindow.ToolkitLock#unlock().
The lock implementation must be recursive.
| RuntimeException | in case the lock is not acquired by this thread. |
Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.
| void com.jogamp.nativewindow.AbstractGraphicsDevice.validateLocked | ( | ) | throws RuntimeException |
| RuntimeException | if current thread does not hold the lock |
Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.
|
static |
Definition at line 49 of file AbstractGraphicsDevice.java.
|
static |
Dummy connection value for a default connection where no native support for multiple devices is available.
Definition at line 52 of file AbstractGraphicsDevice.java.
|
static |
Default unit id for the 1st device: 0.
Definition at line 58 of file AbstractGraphicsDevice.java.
|
static |
Dummy connection value for an external connection where no native support for multiple devices is available.
Definition at line 55 of file AbstractGraphicsDevice.java.