Package com.jogamp.nativewindow
Class DefaultGraphicsConfiguration
java.lang.Object
com.jogamp.nativewindow.DefaultGraphicsConfiguration
- All Implemented Interfaces:
AbstractGraphicsConfiguration
,VisualIDHolder
,Cloneable
- Direct Known Subclasses:
AWTGraphicsConfiguration
,MutableGraphicsConfiguration
public class DefaultGraphicsConfiguration
extends Object
implements Cloneable, AbstractGraphicsConfiguration
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jogamp.nativewindow.VisualIDHolder
VisualIDHolder.VIDComparator, VisualIDHolder.VIDType
-
Field Summary
Fields inherited from interface com.jogamp.nativewindow.VisualIDHolder
VID_UNDEFINED
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultGraphicsConfiguration
(AbstractGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested) -
Method Summary
Modifier and TypeMethodDescriptionclone()
final CapabilitiesImmutable
Return the capabilities reflecting this graphics configuration, which may differ from the capabilities used to choose this configuration.In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the nativeAbstractGraphicsConfiguration
, otherwise this instance.final CapabilitiesImmutable
Return the capabilities used to choose this graphics configuration.final AbstractGraphicsScreen
Return the screen this graphics configuration is valid forfinal int
Returns the native visual ID of the giventype
if supported, orVisualIDHolder.VID_UNDEFINED
if not supported.static String
toHexString
(int val) static String
toHexString
(long val) toString()
-
Constructor Details
-
DefaultGraphicsConfiguration
public DefaultGraphicsConfiguration(AbstractGraphicsScreen screen, CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested)
-
-
Method Details
-
clone
- Specified by:
clone
in interfaceAbstractGraphicsConfiguration
-
getScreen
Description copied from interface:AbstractGraphicsConfiguration
Return the screen this graphics configuration is valid for- Specified by:
getScreen
in interfaceAbstractGraphicsConfiguration
-
getChosenCapabilities
Description copied from interface:AbstractGraphicsConfiguration
Return the capabilities reflecting this graphics configuration, which may differ from the capabilities used to choose this configuration.- Specified by:
getChosenCapabilities
in interfaceAbstractGraphicsConfiguration
- Returns:
- An immutable instance of the Capabilities to avoid mutation by the user.
-
getRequestedCapabilities
Description copied from interface:AbstractGraphicsConfiguration
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.- Specified by:
getRequestedCapabilities
in interfaceAbstractGraphicsConfiguration
- Returns:
- An immutable instance of the Capabilities to avoid mutation by the user.
-
getNativeGraphicsConfiguration
Description copied from interface:AbstractGraphicsConfiguration
In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the nativeAbstractGraphicsConfiguration
, otherwise this instance.- Specified by:
getNativeGraphicsConfiguration
in interfaceAbstractGraphicsConfiguration
- See Also:
-
getVisualID
Description copied from interface:VisualIDHolder
Returns the native visual ID of the giventype
if supported, orVisualIDHolder.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 IDNATIVE
: X11 XVisual IDX11_XVISUAL
: X11 XVisual IDX11_FBCONFIG
:VID_UNDEFINED
- X11/GL throws NativeWindowException on
EGL_CONFIG
,WIN32_PFD
INTRINSIC
: X11 XVisual IDNATIVE
: X11 XVisual IDX11_XVISUAL
: X11 XVisual IDX11_FBCONFIG
: X11 FBConfig ID orVID_UNDEFINED
- Windows/GL throws NativeWindowException on
EGL_CONFIG
,X11_XVISUAL
,X11_FBCONFIG
INTRINSIC
: Win32 PIXELFORMATDESCRIPTOR IDNATIVE
: Win32 PIXELFORMATDESCRIPTOR IDWIN32_PFD
: Win32 PIXELFORMATDESCRIPTOR ID
- EGL/GL throws NativeWindowException on
X11_XVISUAL
,X11_FBCONFIG
,WIN32_PFD
INTRINSIC
: EGL Config IDNATIVE
: EGL NativeVisual ID (X11 XVisual ID, Win32 PIXELFORMATDESCRIPTOR ID, ...)EGL_CONFIG
: EGL Config ID
INTRINSIC
andNATIVE
are always handled, but may result inVisualIDHolder.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.- Specified by:
getVisualID
in interfaceVisualIDHolder
- Throws:
NativeWindowException
- iftype
is neitherINTRINSIC
norNATIVE
and does not match the native implementation.
- X11 throws NativeWindowException on
-
toString
-
toHexString
-
toHexString
-