33package com.jogamp.nativewindow;
35import com.jogamp.nativewindow.VisualIDHolder.VIDType;
37import jogamp.nativewindow.Debug;
40 protected static final boolean DEBUG = Debug.debug(
"GraphicsConfiguration");
49 throw new IllegalArgumentException(
"Null screen");
51 if(
null == capsChosen) {
52 throw new IllegalArgumentException(
"Null chosen caps");
54 if(
null == capsRequested) {
55 throw new IllegalArgumentException(
"Null requested caps");
58 this.capabilitiesChosen = capsChosen;
59 this.capabilitiesRequested = capsRequested;
66 }
catch (
final CloneNotSupportedException e) {
111 this.capabilitiesChosen = capsChosen;
123 this.screen = screen;
128 return getClass().getSimpleName()+
"[" + screen +
135 return "0x"+Integer.toHexString(val);
139 return "0x"+Long.toHexString(val);
void setScreen(final AbstractGraphicsScreen screen)
Set a new screen.
final CapabilitiesImmutable getRequestedCapabilities()
Return the capabilities used to choose this graphics configuration.
final int getVisualID(final VIDType type)
Returns the native visual ID of the given type if supported, or VID_UNDEFINED if not supported.
void setChosenCapabilities(final CapabilitiesImmutable capsChosen)
Set the capabilities to a new value.
CapabilitiesImmutable capabilitiesRequested
final AbstractGraphicsScreen getScreen()
Return the screen this graphics configuration is valid for.
static String toHexString(final int val)
CapabilitiesImmutable capabilitiesChosen
DefaultGraphicsConfiguration(final AbstractGraphicsScreen screen, final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested)
static String toHexString(final long val)
final boolean isVisualIDSupported(final VIDType type)
Returns true if the given VIDType is supported, otherwise false.
final CapabilitiesImmutable getChosenCapabilities()
Return the capabilities reflecting this graphics configuration, which may differ from the capabilitie...
static final boolean DEBUG
AbstractGraphicsConfiguration getNativeGraphicsConfiguration()
In case the implementation utilizes a delegation pattern to wrap abstract toolkits,...
A generic exception for OpenGL errors used throughout the binding as a substitute for RuntimeExceptio...
A marker interface describing a graphics configuration, visual, or pixel format in a toolkit-independ...
A interface describing a graphics screen in a toolkit-independent manner.
Specifies an immutable set of capabilities that a window's rendering context must support,...
int getVisualID(VIDType type)
Returns the native visual ID of the given type if supported, or VID_UNDEFINED if not supported.
boolean isVisualIDSupported(VIDType type)
Returns true if the given VIDType is supported, otherwise false.