public class Capabilities extends Object implements CapabilitiesImmutable, Cloneable, Comparable
VisualIDHolder.VIDComparator, VisualIDHolder.VIDTypeVID_UNDEFINED| Constructor and Description |
|---|
Capabilities()
Creates a Capabilities object.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
Object |
cloneMutable() |
int |
compareTo(Object o)
comparing RGBA values only
|
boolean |
equals(Object obj)
Equality over the immutable attributes of both objects
|
int |
getAlphaBits()
Returns the number of bits requested for the color buffer's
alpha component.
|
int |
getBlueBits()
Returns the number of bits requested for the color buffer's blue
component.
|
int |
getGreenBits()
Returns the number of bits requested for the color buffer's
green component.
|
int |
getRedBits()
Returns the number of bits requested for the color buffer's red
component.
|
int |
getTransparentAlphaValue()
Gets the transparent alpha value for the frame buffer configuration.
|
int |
getTransparentBlueValue()
Gets the transparent blue value for the frame buffer configuration.
|
int |
getTransparentGreenValue()
Gets the transparent green value for the frame buffer configuration.
|
int |
getTransparentRedValue()
Gets the transparent red value for the frame buffer configuration.
|
int |
getVisualID(VisualIDHolder.VIDType type)
Returns the native visual ID of the given
type
if supported, or VisualIDHolder.VID_UNDEFINED if not supported. |
int |
hashCode()
hash code over the immutable attributes of both objects
|
boolean |
isBackgroundOpaque()
Indicates whether the background of this OpenGL context should
be considered opaque.
|
boolean |
isOnscreen()
Indicates whether the drawable surface is onscreen.
|
void |
setAlphaBits(int alphaBits)
Sets the number of bits requested for the color buffer's alpha
component.
|
void |
setBackgroundOpaque(boolean opaque)
Defaults to true, ie.
|
void |
setBlueBits(int blueBits)
Sets the number of bits requested for the color buffer's blue
component.
|
void |
setGreenBits(int greenBits)
Sets the number of bits requested for the color buffer's green
component.
|
void |
setOnscreen(boolean onscreen)
Sets whether the drawable surface supports onscreen.
|
void |
setRedBits(int redBits)
Sets the number of bits requested for the color buffer's red
component.
|
void |
setTransparentAlphaValue(int transValueAlpha)
Sets the transparent alpha value for the frame buffer configuration,
ranging from 0 to the maximum frame buffer value for alpha.
|
void |
setTransparentBlueValue(int transValueBlue)
Sets the transparent blue value for the frame buffer configuration,
ranging from 0 to the maximum frame buffer value for blue.
|
void |
setTransparentGreenValue(int transValueGreen)
Sets the transparent green value for the frame buffer configuration,
ranging from 0 to the maximum frame buffer value for green.
|
void |
setTransparentRedValue(int transValueRed)
Sets the transparent red value for the frame buffer configuration,
ranging from 0 to the maximum frame buffer value for red.
|
String |
toString()
Returns a textual representation of this Capabilities
object.
|
StringBuilder |
toString(StringBuilder sink)
Return a textual representation of this object.
|
public Capabilities()
public Object cloneMutable()
cloneMutable in interface com.jogamp.common.type.WriteCloneablepublic int hashCode()
CapabilitiesImmutablehashCode in interface CapabilitiesImmutablehashCode in class Objectpublic boolean equals(Object obj)
CapabilitiesImmutableequals in interface CapabilitiesImmutableequals in class Objectpublic int compareTo(Object o)
compareTo in interface Comparablepublic int getVisualID(VisualIDHolder.VIDType type) throws NativeWindowException
VisualIDHoldertype
if supported, or VisualIDHolder.VID_UNDEFINED if not supported.
Depending on the native windowing system, type is handled as follows:
EGL_CONFIG, WIN32_PFD
INTRINSIC: X11 XVisual IDNATIVE: X11 XVisual IDX11_XVISUAL: X11 XVisual IDX11_FBCONFIG: VID_UNDEFINEDEGL_CONFIG, WIN32_PFD
INTRINSIC: X11 XVisual IDNATIVE: X11 XVisual IDX11_XVISUAL: X11 XVisual IDX11_FBCONFIG: X11 FBConfig ID or VID_UNDEFINEDEGL_CONFIG, X11_XVISUAL, X11_FBCONFIG
INTRINSIC: Win32 PIXELFORMATDESCRIPTOR IDNATIVE: Win32 PIXELFORMATDESCRIPTOR IDWIN32_PFD: Win32 PIXELFORMATDESCRIPTOR IDX11_XVISUAL, X11_FBCONFIG, WIN32_PFD
INTRINSIC: EGL Config IDNATIVE: EGL NativeVisual ID (X11 XVisual ID, Win32 PIXELFORMATDESCRIPTOR ID, ...)EGL_CONFIG: EGL Config IDINTRINSIC and NATIVE are always handled,
but may result in VisualIDHolder.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.getVisualID in interface VisualIDHolderNativeWindowException - if type is neither
INTRINSIC nor NATIVE
and does not match the native implementation.public int getRedBits()
getRedBits in interface CapabilitiesImmutablepublic void setRedBits(int redBits)
public int getGreenBits()
getGreenBits in interface CapabilitiesImmutablepublic void setGreenBits(int greenBits)
public int getBlueBits()
getBlueBits in interface CapabilitiesImmutablepublic void setBlueBits(int blueBits)
public int getAlphaBits()
getAlphaBits in interface CapabilitiesImmutablepublic void setAlphaBits(int alphaBits)
public void setBackgroundOpaque(boolean opaque)
On supported platforms, setting opaque to false may result in a translucent surface.
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.
The platform implementation may utilize the transparency RGBA values.
This is true for the original GLX transparency specification, which is no more used today.
Actually these values are currently not used by any implementation,
so we may mark them deprecated soon, if this doesn't change.
public boolean isBackgroundOpaque()
isBackgroundOpaque in interface CapabilitiesImmutablesetBackgroundOpaque(boolean)public void setOnscreen(boolean onscreen)
public boolean isOnscreen()
isOnscreen in interface CapabilitiesImmutablepublic int getTransparentRedValue()
isBackgroundOpaque() equals true.getTransparentRedValue in interface CapabilitiesImmutablesetTransparentRedValue(int)public int getTransparentGreenValue()
isBackgroundOpaque() equals true.getTransparentGreenValue in interface CapabilitiesImmutablesetTransparentGreenValue(int)public int getTransparentBlueValue()
isBackgroundOpaque() equals true.getTransparentBlueValue in interface CapabilitiesImmutablesetTransparentBlueValue(int)public int getTransparentAlphaValue()
isBackgroundOpaque() equals true.getTransparentAlphaValue in interface CapabilitiesImmutablesetTransparentAlphaValue(int)public void setTransparentRedValue(int transValueRed)
isBackgroundOpaque() equals true.public void setTransparentGreenValue(int transValueGreen)
isBackgroundOpaque() equals true.public void setTransparentBlueValue(int transValueBlue)
isBackgroundOpaque() equals true.public void setTransparentAlphaValue(int transValueAlpha)
isBackgroundOpaque() equals true.public StringBuilder toString(StringBuilder sink)
CapabilitiesImmutabletoString in interface CapabilitiesImmutablepublic String toString()
toString in interface CapabilitiesImmutabletoString in class ObjectCopyright 2010 JogAmp Community.