JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Specifies a set of capabilities that a window's rendering context must support, such as color depth per channel. More...
Public Member Functions | |
Capabilities () | |
Creates a Capabilities object. More... | |
Object | cloneMutable () |
Object | clone () |
Capabilities | copyFrom (final CapabilitiesImmutable other) |
Copies all Capabilities values from source into this instance. More... | |
int | hashCode () |
Hash code over the immutable attributes. More... | |
boolean | equals (final Object obj) |
Equality over the immutable attributes of both objects. More... | |
int | compareTo (final CapabilitiesImmutable caps) |
Comparing RGBA values only. More... | |
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... | |
boolean | isVisualIDSupported (final VIDType type) |
Returns true if the given VIDType is supported, otherwise false. More... | |
final int | getRedBits () |
Returns the number of bits for the color buffer's red component. More... | |
void | setRedBits (final int redBits) |
Sets the number of bits requested for the color buffer's red component. More... | |
final int | getGreenBits () |
Returns the number of bits for the color buffer's green component. More... | |
void | setGreenBits (final int greenBits) |
Sets the number of bits requested for the color buffer's green component. More... | |
final int | getBlueBits () |
Returns the number of bits for the color buffer's blue component. More... | |
void | setBlueBits (final int blueBits) |
Sets the number of bits requested for the color buffer's blue component. More... | |
final int | getAlphaBits () |
Returns the number of bits for the color buffer's alpha component. More... | |
void | setAlphaBits (final int alphaBits) |
Sets the number of bits requested for the color buffer's alpha component. More... | |
void | setBackgroundOpaque (final boolean opaque) |
Sets whether the surface shall be opaque or translucent. More... | |
final boolean | isBackgroundOpaque () |
Returns whether an opaque or translucent surface is requested, supported or chosen. More... | |
void | setOnscreen (final boolean onscreen) |
Sets whether the surface shall be on- or offscreen. More... | |
final boolean | isOnscreen () |
Returns whether an on- or offscreen surface is requested, available or chosen. More... | |
void | setBitmap (final boolean enable) |
Requesting offscreen bitmap mode. More... | |
boolean | isBitmap () |
Returns whether bitmap offscreen mode is requested, available or chosen. More... | |
final int | getTransparentRedValue () |
Gets the transparent red value for the frame buffer configuration. More... | |
final int | getTransparentGreenValue () |
Gets the transparent green value for the frame buffer configuration. More... | |
final int | getTransparentBlueValue () |
Gets the transparent blue value for the frame buffer configuration. More... | |
final int | getTransparentAlphaValue () |
Gets the transparent alpha value for the frame buffer configuration. More... | |
void | setTransparentRedValue (final int transValueRed) |
Sets the transparent red value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for red. More... | |
void | setTransparentGreenValue (final int transValueGreen) |
Sets the transparent green value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for green. More... | |
void | setTransparentBlueValue (final int transValueBlue) |
Sets the transparent blue value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for blue. More... | |
void | setTransparentAlphaValue (final int transValueAlpha) |
Sets the transparent alpha value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for alpha. More... | |
StringBuilder | toString (final StringBuilder sink) |
Return a textual representation of this object. More... | |
String | toString () |
Returns a textual representation of this Capabilities object. More... | |
int | getRedBits () |
Returns the number of bits for the color buffer's red component. More... | |
int | getGreenBits () |
Returns the number of bits for the color buffer's green component. More... | |
int | getBlueBits () |
Returns the number of bits for the color buffer's blue component. More... | |
int | getAlphaBits () |
Returns the number of bits for the color buffer's alpha component. More... | |
boolean | isBackgroundOpaque () |
Returns whether an opaque or translucent surface is requested, supported or chosen. More... | |
boolean | isOnscreen () |
Returns whether an on- or offscreen surface is requested, available or chosen. More... | |
boolean | isBitmap () |
Returns whether bitmap offscreen mode is requested, available or chosen. More... | |
int | getTransparentRedValue () |
Gets the transparent red value for the frame buffer configuration. More... | |
int | getTransparentGreenValue () |
Gets the transparent green value for the frame buffer configuration. More... | |
int | getTransparentBlueValue () |
Gets the transparent blue value for the frame buffer configuration. More... | |
int | getTransparentAlphaValue () |
Gets the transparent alpha value for the frame buffer configuration. More... | |
boolean | equals (Object obj) |
Equality over the immutable attributes of both objects. More... | |
int | hashCode () |
Hash code over the immutable attributes. More... | |
StringBuilder | toString (StringBuilder sink) |
Return a textual representation of this object. More... | |
String | toString () |
Returns a textual representation of this object. 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... | |
Protected Member Functions | |
StringBuilder | onoffScreenToString (StringBuilder sink) |
Return a textual representation of this object's on/off screen state. More... | |
StringBuilder | toString (StringBuilder sink, final boolean withOnOffScreen) |
final String | toHexString (final int val) |
Static Protected Attributes | |
static final String | na_str = "----" |
static final String | ESEP = "/" |
Element separator. More... | |
static final String | CSEP = ", " |
Component separator. More... | |
Additional Inherited Members | |
![]() | |
static final int | VID_UNDEFINED = 0 |
getVisualID(VIDType) result indicating an undefined value, which could be cause by an unsupported query. More... | |
Specifies a set of capabilities that a window's rendering context must support, such as color depth per channel.
It currently contains the minimal number of routines which allow configuration on all supported window systems.
Definition at line 47 of file Capabilities.java.
com.jogamp.nativewindow.Capabilities.Capabilities | ( | ) |
Creates a Capabilities object.
All attributes are in a default state.
Definition at line 71 of file Capabilities.java.
Object com.jogamp.nativewindow.Capabilities.clone | ( | ) |
Reimplemented in com.jogamp.opengl.GLCapabilities.
Definition at line 79 of file Capabilities.java.
Object com.jogamp.nativewindow.Capabilities.cloneMutable | ( | ) |
Reimplemented in com.jogamp.opengl.GLCapabilities.
Definition at line 74 of file Capabilities.java.
int com.jogamp.nativewindow.Capabilities.compareTo | ( | final CapabilitiesImmutable | caps | ) |
Comparing RGBA values only.
Reimplemented in com.jogamp.opengl.GLCapabilities.
Definition at line 182 of file Capabilities.java.
Capabilities com.jogamp.nativewindow.Capabilities.copyFrom | ( | final CapabilitiesImmutable | other | ) |
Copies all Capabilities
values from source
into this instance.
Reimplemented in com.jogamp.opengl.GLCapabilities.
Definition at line 92 of file Capabilities.java.
boolean com.jogamp.nativewindow.Capabilities.equals | ( | final Object | obj | ) |
Equality over the immutable attributes of both objects.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Reimplemented in com.jogamp.opengl.GLCapabilities.
Definition at line 141 of file Capabilities.java.
final int com.jogamp.nativewindow.Capabilities.getAlphaBits | ( | ) |
Returns the number of bits for the color buffer's alpha component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 262 of file Capabilities.java.
final int com.jogamp.nativewindow.Capabilities.getBlueBits | ( | ) |
Returns the number of bits for the color buffer's blue component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 250 of file Capabilities.java.
final int com.jogamp.nativewindow.Capabilities.getGreenBits | ( | ) |
Returns the number of bits for the color buffer's green component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 238 of file Capabilities.java.
final int com.jogamp.nativewindow.Capabilities.getRedBits | ( | ) |
Returns the number of bits for the color buffer's red component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 226 of file Capabilities.java.
final int com.jogamp.nativewindow.Capabilities.getTransparentAlphaValue | ( | ) |
Gets the transparent alpha value for the frame buffer configuration.
This value is undefined if; equals true.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 364 of file Capabilities.java.
final int com.jogamp.nativewindow.Capabilities.getTransparentBlueValue | ( | ) |
Gets the transparent blue value for the frame buffer configuration.
This value is undefined if; equals true.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 361 of file Capabilities.java.
final int com.jogamp.nativewindow.Capabilities.getTransparentGreenValue | ( | ) |
Gets the transparent green value for the frame buffer configuration.
This value is undefined if; equals true.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 358 of file Capabilities.java.
final int com.jogamp.nativewindow.Capabilities.getTransparentRedValue | ( | ) |
Gets the transparent red value for the frame buffer configuration.
This value is undefined if; equals true.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 355 of file Capabilities.java.
int com.jogamp.nativewindow.Capabilities.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:
EGL_CONFIG
, WIN32_PFD
INTRINSIC
: X11 XVisual ID NATIVE
: X11 XVisual ID X11_XVISUAL
: X11 XVisual ID X11_FBCONFIG
: VID_UNDEFINED
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
EGL_CONFIG
, X11_XVISUAL
, X11_FBCONFIG
INTRINSIC
: Win32 PIXELFORMATDESCRIPTOR ID NATIVE
: Win32 PIXELFORMATDESCRIPTOR ID WIN32_PFD
: Win32 PIXELFORMATDESCRIPTOR ID 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.
NativeWindowException | if type is neither INTRINSIC nor NATIVE and does not match the native implementation. |
Implements com.jogamp.nativewindow.VisualIDHolder.
Definition at line 204 of file Capabilities.java.
int com.jogamp.nativewindow.Capabilities.hashCode | ( | ) |
Hash code over the immutable attributes.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Reimplemented in com.jogamp.opengl.GLCapabilities.
Definition at line 108 of file Capabilities.java.
final boolean com.jogamp.nativewindow.Capabilities.isBackgroundOpaque | ( | ) |
Returns whether an opaque or translucent surface is requested, supported or chosen.
Default is true, i.e. opaque.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 305 of file Capabilities.java.
boolean com.jogamp.nativewindow.Capabilities.isBitmap | ( | ) |
Returns whether bitmap offscreen mode is requested, available or chosen.
Default is false.
For chosen capabilities, only the selected offscreen surface is set to true
.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 350 of file Capabilities.java.
final boolean com.jogamp.nativewindow.Capabilities.isOnscreen | ( | ) |
Returns whether an on- or offscreen surface is requested, available or chosen.
Default is true, i.e. onscreen.
Mind that an capabilities intance w/ available semantics may show onscreen, but also the offscreen modes FBO, Pbuffer or bitmap
. This is valid, since one native configuration maybe used for either functionality.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Definition at line 326 of file Capabilities.java.
boolean com.jogamp.nativewindow.Capabilities.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.
Implements com.jogamp.nativewindow.VisualIDHolder.
Definition at line 215 of file Capabilities.java.
|
protected |
Return a textual representation of this object's on/off screen state.
Use the given StringBuilder [optional].
Definition at line 411 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setAlphaBits | ( | final int | alphaBits | ) |
Sets the number of bits requested for the color buffer's alpha component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Note: If alpha bits are zero
, they are set to one
by setBackgroundOpaque(boolean)
and it's OpenGL specialization GLCapabilities::setSampleBuffers(boolean)
.
Ensure to call this method after the above to ensure a zero
value. The above automated settings takes into account, that the user calls this method to request alpha bits, not to reflect a current state. Nevertheless if this is the case - call it at last.
Definition at line 278 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setBackgroundOpaque | ( | final boolean | opaque | ) |
Sets whether the surface shall be opaque or translucent.
Platform implementations may need an alpha component in the surface (eg. Windows), or expect pre-multiplied alpha values (eg. X11/XRender).
To unify the experience, this method also invokes setAlphaBits(1)
if getAlphaBits()
== 0.
Please note that in case alpha is required on the platform the clear color shall have an alpha lower than 1.0 to allow anything shining through.
Mind that translucency may cause a performance penalty due to the composite work required by the window manager.
Definition at line 297 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setBitmap | ( | final boolean | enable | ) |
Requesting offscreen bitmap mode.
If enabled this method also invokes setOnscreen(false)
.
Defaults to false.
Requesting offscreen bitmap mode disables the offscreen auto selection.
Definition at line 342 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setBlueBits | ( | final int | blueBits | ) |
Sets the number of bits requested for the color buffer's blue component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 257 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setGreenBits | ( | final int | greenBits | ) |
Sets the number of bits requested for the color buffer's green component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 245 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setOnscreen | ( | final boolean | onscreen | ) |
Sets whether the surface shall be on- or offscreen.
Defaults to true.
If requesting an offscreen surface without further selection of it's mode, e.g. FBO, Pbuffer or bitmap
, the implementation will choose the best available offscreen mode.
onscreen |
Definition at line 321 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setRedBits | ( | final int | redBits | ) |
Sets the number of bits requested for the color buffer's red component.
On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.
Definition at line 233 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setTransparentAlphaValue | ( | final int | transValueAlpha | ) |
Sets the transparent alpha value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for alpha.
This value is ignored if isBackgroundOpaque()
equals true.
It defaults to half of the frambuffer value for alpha.
A value of -1 is interpreted as any value.
Definition at line 392 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setTransparentBlueValue | ( | final int | transValueBlue | ) |
Sets the transparent blue value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for blue.
This value is ignored if isBackgroundOpaque()
equals true.
It defaults to half of the frambuffer value for blue.
A value of -1 is interpreted as any value.
Definition at line 385 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setTransparentGreenValue | ( | final int | transValueGreen | ) |
Sets the transparent green value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for green.
This value is ignored if isBackgroundOpaque()
equals true.
It defaults to half of the frambuffer value for green.
A value of -1 is interpreted as any value.
Definition at line 378 of file Capabilities.java.
void com.jogamp.nativewindow.Capabilities.setTransparentRedValue | ( | final int | transValueRed | ) |
Sets the transparent red value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for red.
This value is ignored if isBackgroundOpaque()
equals true.
It defaults to half of the frambuffer value for red.
A value of -1 is interpreted as any value.
Definition at line 371 of file Capabilities.java.
|
protected |
String com.jogamp.nativewindow.Capabilities.toString | ( | ) |
Returns a textual representation of this Capabilities object.
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Reimplemented in com.jogamp.opengl.GLCapabilities.
Definition at line 402 of file Capabilities.java.
StringBuilder com.jogamp.nativewindow.Capabilities.toString | ( | final StringBuilder | sink | ) |
Return a textual representation of this object.
Use the given StringBuilder [optional].
Implements com.jogamp.nativewindow.CapabilitiesImmutable.
Reimplemented in com.jogamp.opengl.GLCapabilities.
Definition at line 395 of file Capabilities.java.
|
protected |
|
staticprotected |
Component separator.
Definition at line 435 of file Capabilities.java.
|
staticprotected |
Element separator.
Definition at line 433 of file Capabilities.java.
|
staticprotected |
Definition at line 48 of file Capabilities.java.