JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.nativewindow.DefaultGraphicsConfiguration Class Reference
Inheritance diagram for com.jogamp.nativewindow.DefaultGraphicsConfiguration:
Collaboration diagram for com.jogamp.nativewindow.DefaultGraphicsConfiguration:

Public Member Functions

 DefaultGraphicsConfiguration (final AbstractGraphicsScreen screen, final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested)
 
Object clone ()
 
final AbstractGraphicsScreen getScreen ()
 Return the screen this graphics configuration is valid for. More...
 
final CapabilitiesImmutable getChosenCapabilities ()
 Return the capabilities reflecting this graphics configuration, which may differ from the capabilities used to choose this configuration. More...
 
final CapabilitiesImmutable getRequestedCapabilities ()
 Return the capabilities used to choose this graphics configuration. More...
 
AbstractGraphicsConfiguration getNativeGraphicsConfiguration ()
 In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the native AbstractGraphicsConfiguration, otherwise this instance. More...
 
final int getVisualID (final VIDType type) throws NativeWindowException
 Returns the native visual ID of the given type if supported, or VID_UNDEFINED if not supported. More...
 
final boolean isVisualIDSupported (final VIDType type)
 Returns true if the given VIDType is supported, otherwise false. More...
 
String toString ()
 
Object clone ()
 
AbstractGraphicsScreen getScreen ()
 Return the screen this graphics configuration is valid for. More...
 
CapabilitiesImmutable getChosenCapabilities ()
 Return the capabilities reflecting this graphics configuration, which may differ from the capabilities used to choose this configuration. More...
 
CapabilitiesImmutable getRequestedCapabilities ()
 Return the capabilities used to choose this graphics configuration. More...
 
AbstractGraphicsConfiguration getNativeGraphicsConfiguration ()
 In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the native AbstractGraphicsConfiguration, otherwise this instance. More...
 
int getVisualID (VIDType type) throws NativeWindowException
 Returns the native visual ID of the given type if supported, or VID_UNDEFINED if not supported. More...
 
boolean isVisualIDSupported (VIDType type)
 Returns true if the given VIDType is supported, otherwise false. More...
 

Static Public Member Functions

static String toHexString (final int val)
 
static String toHexString (final long val)
 

Protected Member Functions

void setChosenCapabilities (final CapabilitiesImmutable capsChosen)
 Set the capabilities to a new value. More...
 
void setScreen (final AbstractGraphicsScreen screen)
 Set a new screen. More...
 

Protected Attributes

CapabilitiesImmutable capabilitiesChosen
 
CapabilitiesImmutable capabilitiesRequested
 

Static Protected Attributes

static final boolean DEBUG = Debug.debug("GraphicsConfiguration")
 

Additional Inherited Members

- Static Public Attributes inherited from com.jogamp.nativewindow.VisualIDHolder
static final int VID_UNDEFINED = 0
 getVisualID(VIDType) result indicating an undefined value, which could be cause by an unsupported query. More...
 

Detailed Description

Definition at line 39 of file DefaultGraphicsConfiguration.java.

Constructor & Destructor Documentation

◆ DefaultGraphicsConfiguration()

com.jogamp.nativewindow.DefaultGraphicsConfiguration.DefaultGraphicsConfiguration ( final AbstractGraphicsScreen  screen,
final CapabilitiesImmutable  capsChosen,
final CapabilitiesImmutable  capsRequested 
)

Definition at line 46 of file DefaultGraphicsConfiguration.java.

Member Function Documentation

◆ clone()

Object com.jogamp.nativewindow.DefaultGraphicsConfiguration.clone ( )

◆ getChosenCapabilities()

final CapabilitiesImmutable com.jogamp.nativewindow.DefaultGraphicsConfiguration.getChosenCapabilities ( )

Return the capabilities reflecting this graphics configuration, which may differ from the capabilities used to choose this configuration.

Returns
An immutable instance of the Capabilities to avoid mutation by the user.

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.

Definition at line 77 of file DefaultGraphicsConfiguration.java.

Here is the caller graph for this function:

◆ getNativeGraphicsConfiguration()

AbstractGraphicsConfiguration com.jogamp.nativewindow.DefaultGraphicsConfiguration.getNativeGraphicsConfiguration ( )

In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the native AbstractGraphicsConfiguration, otherwise this instance.

See also
NativeSurface::getGraphicsConfiguration()

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.

Reimplemented in com.jogamp.nativewindow.awt.AWTGraphicsConfiguration.

Definition at line 87 of file DefaultGraphicsConfiguration.java.

◆ getRequestedCapabilities()

final CapabilitiesImmutable com.jogamp.nativewindow.DefaultGraphicsConfiguration.getRequestedCapabilities ( )

Return the capabilities used to choose this graphics configuration.

These may be used to reconfigure the NativeWindow in case the device changes in a multiple screen environment.

Returns
An immutable instance of the Capabilities to avoid mutation by the user.

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.

Definition at line 82 of file DefaultGraphicsConfiguration.java.

Here is the caller graph for this function:

◆ getScreen()

final AbstractGraphicsScreen com.jogamp.nativewindow.DefaultGraphicsConfiguration.getScreen ( )

Return the screen this graphics configuration is valid for.

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.

Definition at line 72 of file DefaultGraphicsConfiguration.java.

Here is the caller graph for this function:

◆ getVisualID()

final int com.jogamp.nativewindow.DefaultGraphicsConfiguration.getVisualID ( final VIDType  type) throws NativeWindowException

Returns the native visual ID of the given type if supported, or VID_UNDEFINED if not supported.

Depending on the native windowing system, type is handled as follows:

  • X11 throws NativeWindowException on EGL_CONFIG, WIN32_PFD
    • INTRINSIC: X11 XVisual ID
    • NATIVE: X11 XVisual ID
    • X11_XVISUAL: X11 XVisual ID
    • X11_FBCONFIG: VID_UNDEFINED
  • X11/GL throws NativeWindowException on EGL_CONFIG, WIN32_PFD
    • INTRINSIC: X11 XVisual ID
    • NATIVE: X11 XVisual ID
    • X11_XVISUAL: X11 XVisual ID
    • X11_FBCONFIG: X11 FBConfig ID or VID_UNDEFINED
  • Windows/GL throws NativeWindowException on EGL_CONFIG, X11_XVISUAL, X11_FBCONFIG
    • INTRINSIC: Win32 PIXELFORMATDESCRIPTOR ID
    • NATIVE: Win32 PIXELFORMATDESCRIPTOR ID
    • WIN32_PFD: Win32 PIXELFORMATDESCRIPTOR ID
  • EGL/GL throws NativeWindowException on X11_XVISUAL, X11_FBCONFIG, WIN32_PFD
    • INTRINSIC: EGL Config ID
    • NATIVE: EGL NativeVisual ID (X11 XVisual ID, Win32 PIXELFORMATDESCRIPTOR ID, ...)
    • EGL_CONFIG: EGL Config ID

One may use isVisualIDSupported(VIDType) to test upfront whether a VIDType is supported, e.g. to avoid an exception or query or compare all available.

Note: INTRINSIC and NATIVE are always handled, but may result in VID_UNDEFINED. The latter is true if the native value are actually undefined or the corresponding object is not mapped to a native visual object.

Exceptions
NativeWindowExceptionif type is neither INTRINSIC nor NATIVE and does not match the native implementation.
See also
isVisualIDSupported(VIDType)

Implements com.jogamp.nativewindow.VisualIDHolder.

Definition at line 92 of file DefaultGraphicsConfiguration.java.

Here is the call graph for this function:

◆ isVisualIDSupported()

final boolean com.jogamp.nativewindow.DefaultGraphicsConfiguration.isVisualIDSupported ( final VIDType  type)

Returns true if the given VIDType is supported, otherwise false.

Note: INTRINSIC and NATIVE are always handled, but may result in VID_UNDEFINED. The latter is true if the native value are actually undefined or the corresponding object is not mapped to a native visual object.

See also
getVisualID(VIDType)

Implements com.jogamp.nativewindow.VisualIDHolder.

Definition at line 97 of file DefaultGraphicsConfiguration.java.

Here is the call graph for this function:

◆ setChosenCapabilities()

void com.jogamp.nativewindow.DefaultGraphicsConfiguration.setChosenCapabilities ( final CapabilitiesImmutable  capsChosen)
protected

Set the capabilities to a new value.

The use case for setting the Capabilities at a later time is a change or re-validation of capabilities.

See also
com.jogamp.nativewindow.GraphicsConfigurationFactory::chooseGraphicsConfiguration(Capabilities, CapabilitiesChooser, AbstractGraphicsScreen)

Reimplemented in com.jogamp.nativewindow.MutableGraphicsConfiguration, and com.jogamp.nativewindow.awt.AWTGraphicsConfiguration.

Definition at line 110 of file DefaultGraphicsConfiguration.java.

◆ setScreen()

void com.jogamp.nativewindow.DefaultGraphicsConfiguration.setScreen ( final AbstractGraphicsScreen  screen)
protected

Set a new screen.

the use case for setting a new screen at a later time is a change of the graphics device in a multi-screen environment.

Reimplemented in com.jogamp.nativewindow.MutableGraphicsConfiguration.

Definition at line 122 of file DefaultGraphicsConfiguration.java.

◆ toHexString() [1/2]

static String com.jogamp.nativewindow.DefaultGraphicsConfiguration.toHexString ( final int  val)
static

Definition at line 134 of file DefaultGraphicsConfiguration.java.

◆ toHexString() [2/2]

static String com.jogamp.nativewindow.DefaultGraphicsConfiguration.toHexString ( final long  val)
static

Definition at line 138 of file DefaultGraphicsConfiguration.java.

◆ toString()

String com.jogamp.nativewindow.DefaultGraphicsConfiguration.toString ( )

Member Data Documentation

◆ capabilitiesChosen

CapabilitiesImmutable com.jogamp.nativewindow.DefaultGraphicsConfiguration.capabilitiesChosen
protected

Definition at line 43 of file DefaultGraphicsConfiguration.java.

◆ capabilitiesRequested

CapabilitiesImmutable com.jogamp.nativewindow.DefaultGraphicsConfiguration.capabilitiesRequested
protected

Definition at line 44 of file DefaultGraphicsConfiguration.java.

◆ DEBUG

final boolean com.jogamp.nativewindow.DefaultGraphicsConfiguration.DEBUG = Debug.debug("GraphicsConfiguration")
staticprotected

Definition at line 40 of file DefaultGraphicsConfiguration.java.


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