Top Fields Constructors Methods
com.jogamp.nativewindow

public Class DefaultGraphicsConfiguration

extends Object
implements Cloneable, AbstractGraphicsConfiguration
Class Inheritance
All Implemented Interfaces
com.jogamp.nativewindow.AbstractGraphicsConfiguration, java.lang.Cloneable, com.jogamp.nativewindow.VisualIDHolder
Known Direct Subclasses
com.jogamp.nativewindow.MutableGraphicsConfiguration, com.jogamp.nativewindow.awt.AWTGraphicsConfiguration
Imports
jogamp.nativewindow.Debug

Field Summary

Modifier and TypeField and Description
protected CapabilitiesImmutable
protected CapabilitiesImmutable
protected static final boolean
private AbstractGraphicsScreen

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides java.lang.Object.clone.

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.clone.

Creates and returns a copy of this object.
public final CapabilitiesImmutable
getChosenCapabilities()

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.getChosenCapabilities.

Return the capabilities reflecting this graphics configuration, which may differ from the capabilities used to choose this configuration.
public AbstractGraphicsConfiguration
getNativeGraphicsConfiguration()

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.getNativeGraphicsConfiguration.

In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the native AbstractGraphicsConfiguration, otherwise this instance.
public final CapabilitiesImmutable
getRequestedCapabilities()

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.getRequestedCapabilities.

Return the capabilities used to choose this graphics configuration.
public final AbstractGraphicsScreen
getScreen()

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.getScreen.

Return the screen this graphics configuration is valid for
public final int
getVisualID(final VisualIDHolder.VIDType type)

Implements com.jogamp.nativewindow.VisualIDHolder.getVisualID.

Returns the native visual ID of the given type if supported, or VID_UNDEFINED if not supported.
protected void
setChosenCapabilities(final CapabilitiesImmutable capsChosen)

Set the capabilities to a new value.

protected void
setScreen(final AbstractGraphicsScreen screen)

Set a new screen.

public static String
toHexString(final int val)

public static String
toHexString(final long val)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

capabilitiesChosenback to summary
protected CapabilitiesImmutable capabilitiesChosen
capabilitiesRequestedback to summary
protected CapabilitiesImmutable capabilitiesRequested
DEBUGback to summary
protected static final boolean DEBUG
screenback to summary
private AbstractGraphicsScreen screen

Constructor Detail

DefaultGraphicsConfigurationback to summary
public DefaultGraphicsConfiguration(final AbstractGraphicsScreen screen, final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested)

Method Detail

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:Object

a clone of this instance.

Annotations
@Override
getChosenCapabilitiesback to summary
public final CapabilitiesImmutable getChosenCapabilities()

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.getChosenCapabilities.

Doc from com.jogamp.nativewindow.AbstractGraphicsConfiguration.getChosenCapabilities.

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

Returns:CapabilitiesImmutable

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

Annotations
@Override
getNativeGraphicsConfigurationback to summary
public AbstractGraphicsConfiguration getNativeGraphicsConfiguration()

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.getNativeGraphicsConfiguration.

Doc from com.jogamp.nativewindow.AbstractGraphicsConfiguration.getNativeGraphicsConfiguration.

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

Annotations
@Override
getRequestedCapabilitiesback to summary
public final CapabilitiesImmutable getRequestedCapabilities()

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.getRequestedCapabilities.

Doc from com.jogamp.nativewindow.AbstractGraphicsConfiguration.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:CapabilitiesImmutable

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

Annotations
@Override
getScreenback to summary
public final AbstractGraphicsScreen getScreen()

Implements com.jogamp.nativewindow.AbstractGraphicsConfiguration.getScreen.

Doc from com.jogamp.nativewindow.AbstractGraphicsConfiguration.getScreen.

Return the screen this graphics configuration is valid for

Annotations
@Override
getVisualIDback to summary
public final int getVisualID(final VisualIDHolder.VIDType type) throws NativeWindowException

Implements com.jogamp.nativewindow.VisualIDHolder.getVisualID.

Doc from com.jogamp.nativewindow.VisualIDHolder.getVisualID.

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

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.
Annotations
@Override
Exceptions
NativeWindowException:
if type is neither INTRINSIC nor NATIVE and does not match the native implementation.
setChosenCapabilitiesback to summary
protected void setChosenCapabilities(final CapabilitiesImmutable capsChosen)

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)
setScreenback to summary
protected void setScreen(final AbstractGraphicsScreen screen)

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.

toHexStringback to summary
public static String toHexString(final int val)
toHexStringback to summary
public static String toHexString(final long val)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override