JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.nativewindow.AbstractGraphicsDevice Interface Reference

A interface describing a graphics device in a toolkit-independent manner. More...

Inheritance diagram for com.jogamp.nativewindow.AbstractGraphicsDevice:
Collaboration diagram for com.jogamp.nativewindow.AbstractGraphicsDevice:

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...
 

Detailed Description

A interface describing a graphics device in a toolkit-independent manner.

Definition at line 48 of file AbstractGraphicsDevice.java.

Member Function Documentation

◆ clearHandleOwner()

void com.jogamp.nativewindow.AbstractGraphicsDevice.clearHandleOwner ( )

Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.

Here is the caller graph for this function:

◆ clone()

◆ close()

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.

Returns
true if the handle was not null and closing was successful, otherwise false.

Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice, com.jogamp.nativewindow.egl.EGLGraphicsDevice, and com.jogamp.nativewindow.x11.X11GraphicsDevice.

Here is the caller graph for this function:

◆ getConnection()

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.

Here is the caller graph for this function:

◆ getHandle()

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.

Here is the caller graph for this function:

◆ getType()

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.

Here is the caller graph for this function:

◆ getUniqueID()

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.

Here is the caller graph for this function:

◆ getUnitID()

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().

Returns

Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.

Here is the caller graph for this function:

◆ isHandleOwner()

boolean com.jogamp.nativewindow.AbstractGraphicsDevice.isHandleOwner ( )
Returns
true if instance owns the handle to issue close(), otherwise false.

Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.

◆ lock()

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.

Here is the caller graph for this function:

◆ open()

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.

Returns
true if the handle was null and opening was successful, otherwise false.

Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice, com.jogamp.nativewindow.egl.EGLGraphicsDevice, and com.jogamp.nativewindow.x11.X11GraphicsDevice.

Here is the caller graph for this function:

◆ unlock()

void com.jogamp.nativewindow.AbstractGraphicsDevice.unlock ( )

Optionally unlocking the device, utilizing eg com.jogamp.nativewindow.ToolkitLock#unlock().

The lock implementation must be recursive.

Exceptions
RuntimeExceptionin case the lock is not acquired by this thread.

Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.

Here is the caller graph for this function:

◆ validateLocked()

void com.jogamp.nativewindow.AbstractGraphicsDevice.validateLocked ( ) throws RuntimeException
Exceptions
RuntimeExceptionif current thread does not hold the lock

Implemented in com.jogamp.nativewindow.DefaultGraphicsDevice.

Member Data Documentation

◆ DEBUG

final boolean com.jogamp.nativewindow.AbstractGraphicsDevice.DEBUG = Debug.debug("GraphicsDevice")
static

Definition at line 49 of file AbstractGraphicsDevice.java.

◆ DEFAULT_CONNECTION

String com.jogamp.nativewindow.AbstractGraphicsDevice.DEFAULT_CONNECTION = "decon"
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.

◆ DEFAULT_UNIT

int com.jogamp.nativewindow.AbstractGraphicsDevice.DEFAULT_UNIT = 0
static

Default unit id for the 1st device: 0.

Definition at line 58 of file AbstractGraphicsDevice.java.

◆ EXTERNAL_CONNECTION

String com.jogamp.nativewindow.AbstractGraphicsDevice.EXTERNAL_CONNECTION = "excon"
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.


The documentation for this interface was generated from the following file: