|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Public Member Functions | |||
| DefaultGraphicsDevice (final String type, final String connection, final int unitID) | |||
Create an instance with the system default ToolkitLock, gathered via NativeWindowFactory#getDefaultToolkitLock(String). More... | |||
| DefaultGraphicsDevice (final String type, final String connection, final int unitID, final long handle) | |||
Create an instance with the system default ToolkitLock. More... | |||
| DefaultGraphicsDevice (final String type, final String connection, final int unitID, final long handle, final ToolkitLock locker) | |||
Create an instance with the given ToolkitLock instance, or null ToolkitLock if null. More... | |||
| Object | clone () | ||
| final String | getType () | ||
| Returns the type of the underlying subsystem, ie NativeWindowFactory.TYPE_KD, NativeWindowFactory.TYPE_X11, . More... | |||
| final String | getConnection () | ||
| Returns the semantic GraphicsDevice connection. More... | |||
| final int | getUnitID () | ||
Returns the graphics device unit ID. More... | |||
| final String | getUniqueID () | ||
Returns a unique ID object of this device using type, connection and unitID as it's key components. More... | |||
| final long | getHandle () | ||
| Returns the native handle of the underlying native device, if such thing exist. More... | |||
| final void | lock () | ||
Optionally locking the device, utilizing eg com.jogamp.nativewindow.ToolkitLock#lock().The lock implementation must be recursive. More... | |||
| final void | validateLocked () throws RuntimeException | ||
| final void | unlock () | ||
Optionally unlocking the device, utilizing eg com.jogamp.nativewindow.ToolkitLock#unlock().The lock implementation must be recursive.
| |||
| boolean | open () | ||
Optionally [re]opening the device if handle is null. More... | |||
| boolean | close () | ||
Optionally closing the device if handle is not null. More... | |||
| final boolean | isHandleOwner () | ||
| final void | clearHandleOwner () | ||
| String | toString () | ||
| final ToolkitLock | getToolkitLock () | ||
| 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 Member Functions | |
| static String | getDefaultDisplayConnection () |
Return the default display connection for the given windowing toolkit type gathered via NativeWindowFactory#getDefaultDisplayConnection(). More... | |
| static String | getDefaultDisplayConnection (final String type) |
Return the default display connection for the given windowing toolkit type gathered via NativeWindowFactory#getDefaultDisplayConnection(String). More... | |
| static final void | swapHandleAndOwnership (final DefaultGraphicsDevice a, final DefaultGraphicsDevice b) |
Protected Member Functions | |
| final long | setHandle (final long newHandle) |
| Set the native handle of the underlying native device and return the previous one. More... | |
| final Object | getHandleOwnership () |
| final Object | setHandleOwnership (final Object newOwnership) |
| ToolkitLock | setToolkitLock (final ToolkitLock locker) |
Set the internal ToolkitLock, which is used within the lock() and unlock() implementation. More... | |
Protected Attributes | |
| final String | connection |
| final int | unitID |
| final String | uniqueID |
| long | handle |
| ToolkitLock | toolkitLock |
Additional Inherited Members | |
Static Public Attributes inherited from com.jogamp.nativewindow.AbstractGraphicsDevice | |
| 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... | |
Definition at line 38 of file DefaultGraphicsDevice.java.
| com.jogamp.nativewindow.DefaultGraphicsDevice.DefaultGraphicsDevice | ( | final String | type, |
| final String | connection, | ||
| final int | unitID | ||
| ) |
Create an instance with the system default ToolkitLock, gathered via NativeWindowFactory#getDefaultToolkitLock(String).
| type |
Definition at line 70 of file DefaultGraphicsDevice.java.
| com.jogamp.nativewindow.DefaultGraphicsDevice.DefaultGraphicsDevice | ( | final String | type, |
| final String | connection, | ||
| final int | unitID, | ||
| final long | handle | ||
| ) |
Create an instance with the system default ToolkitLock.
gathered via NativeWindowFactory#getDefaultToolkitLock(String).
| type | |
| handle |
Definition at line 80 of file DefaultGraphicsDevice.java.
| com.jogamp.nativewindow.DefaultGraphicsDevice.DefaultGraphicsDevice | ( | final String | type, |
| final String | connection, | ||
| final int | unitID, | ||
| final long | handle, | ||
| final ToolkitLock | locker | ||
| ) |
Create an instance with the given ToolkitLock instance, or null ToolkitLock if null.
| type | |
| handle | |
| locker | if null, a non blocking null lock is used. |
Definition at line 90 of file DefaultGraphicsDevice.java.
| final void com.jogamp.nativewindow.DefaultGraphicsDevice.clearHandleOwner | ( | ) |
Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Definition at line 188 of file DefaultGraphicsDevice.java.
| Object com.jogamp.nativewindow.DefaultGraphicsDevice.clone | ( | ) |
Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Reimplemented in com.jogamp.nativewindow.awt.AWTGraphicsDevice, 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.
Definition at line 101 of file DefaultGraphicsDevice.java.
| boolean com.jogamp.nativewindow.DefaultGraphicsDevice.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. Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Reimplemented in com.jogamp.nativewindow.egl.EGLGraphicsDevice, and com.jogamp.nativewindow.x11.X11GraphicsDevice.
Definition at line 173 of file DefaultGraphicsDevice.java.
| final String com.jogamp.nativewindow.DefaultGraphicsDevice.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().
Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Definition at line 115 of file DefaultGraphicsDevice.java.
|
static |
Return the default display connection for the given windowing toolkit type gathered via NativeWindowFactory#getDefaultDisplayConnection().
| type |
Definition at line 53 of file DefaultGraphicsDevice.java.
|
static |
Return the default display connection for the given windowing toolkit type gathered via NativeWindowFactory#getDefaultDisplayConnection(String).
| type |
Definition at line 61 of file DefaultGraphicsDevice.java.
| final long com.jogamp.nativewindow.DefaultGraphicsDevice.getHandle | ( | ) |
Returns the native handle of the underlying native device, if such thing exist.
Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Definition at line 130 of file DefaultGraphicsDevice.java.
|
protected |
Definition at line 208 of file DefaultGraphicsDevice.java.
| final ToolkitLock com.jogamp.nativewindow.DefaultGraphicsDevice.getToolkitLock | ( | ) |
Definition at line 265 of file DefaultGraphicsDevice.java.
| final String com.jogamp.nativewindow.DefaultGraphicsDevice.getType | ( | ) |
Returns the type of the underlying subsystem, ie NativeWindowFactory.TYPE_KD, NativeWindowFactory.TYPE_X11, .
Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Definition at line 110 of file DefaultGraphicsDevice.java.
| final String com.jogamp.nativewindow.DefaultGraphicsDevice.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.
Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Definition at line 125 of file DefaultGraphicsDevice.java.
| final int com.jogamp.nativewindow.DefaultGraphicsDevice.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().
Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Definition at line 120 of file DefaultGraphicsDevice.java.
| final boolean com.jogamp.nativewindow.DefaultGraphicsDevice.isHandleOwner | ( | ) |
true if instance owns the handle to issue close(), otherwise false. Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Definition at line 183 of file DefaultGraphicsDevice.java.
| final void com.jogamp.nativewindow.DefaultGraphicsDevice.lock | ( | ) |
Optionally locking the device, utilizing eg com.jogamp.nativewindow.ToolkitLock#lock().The lock implementation must be recursive.
Locking is perfomed via delegation to ToolkitLock#lock(), ToolkitLock#unlock().
Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Definition at line 144 of file DefaultGraphicsDevice.java.
| boolean com.jogamp.nativewindow.DefaultGraphicsDevice.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. Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Reimplemented in com.jogamp.nativewindow.egl.EGLGraphicsDevice, and com.jogamp.nativewindow.x11.X11GraphicsDevice.
Definition at line 168 of file DefaultGraphicsDevice.java.
|
protected |
Set the native handle of the underlying native device and return the previous one.
Definition at line 202 of file DefaultGraphicsDevice.java.
|
protected |
Definition at line 211 of file DefaultGraphicsDevice.java.
|
protected |
Set the internal ToolkitLock, which is used within the lock() and unlock() implementation.
The current ToolkitLock is being locked/unlocked while swapping the reference, ensuring no concurrent access can occur during the swap.
| locker | the ToolkitLock, if null, jogamp.nativewindow.NullToolkitLock is being used |
Definition at line 248 of file DefaultGraphicsDevice.java.
|
static |
Definition at line 217 of file DefaultGraphicsDevice.java.
| String com.jogamp.nativewindow.DefaultGraphicsDevice.toString | ( | ) |
Reimplemented in com.jogamp.nativewindow.awt.AWTGraphicsDevice, and com.jogamp.nativewindow.egl.EGLGraphicsDevice.
Definition at line 193 of file DefaultGraphicsDevice.java.
| final void com.jogamp.nativewindow.DefaultGraphicsDevice.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. |
Locking is perfomed via delegation to ToolkitLock#lock(), ToolkitLock#unlock().
Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Definition at line 163 of file DefaultGraphicsDevice.java.
| final void com.jogamp.nativewindow.DefaultGraphicsDevice.validateLocked | ( | ) | throws RuntimeException |
| RuntimeException | if current thread does not hold the lock |
Implements com.jogamp.nativewindow.AbstractGraphicsDevice.
Definition at line 149 of file DefaultGraphicsDevice.java.
|
protected |
Definition at line 41 of file DefaultGraphicsDevice.java.
|
protected |
Definition at line 44 of file DefaultGraphicsDevice.java.
|
protected |
Definition at line 46 of file DefaultGraphicsDevice.java.
|
protected |
Definition at line 43 of file DefaultGraphicsDevice.java.
|
protected |
Definition at line 42 of file DefaultGraphicsDevice.java.