|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.media.nativewindow.Capabilities
javax.media.opengl.GLCapabilities
public class GLCapabilities
Specifies a set of OpenGL capabilities.
At creation time of a GLDrawable using GLDrawableFactory,
an instance of this class is passed,
describing the desired capabilities that a rendering context
must support, such as the OpenGL profile, color depth and whether stereo is enabled.
The actual capabilites of created GLDrawables are then reflected by their own
GLCapabilites instance, which can be queried with GLDrawable#getGLCapabilities().
It currently contains the minimal number of routines which allow
configuration on all supported window systems.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.media.nativewindow.VisualIDHolder |
|---|
VisualIDHolder.VIDComparator, VisualIDHolder.VIDType |
| Field Summary |
|---|
| Fields inherited from interface javax.media.opengl.GLCapabilitiesImmutable |
|---|
DEFAULT_SAMPLE_EXTENSION |
| Fields inherited from interface javax.media.nativewindow.VisualIDHolder |
|---|
VID_UNDEFINED |
| Constructor Summary | |
|---|---|
GLCapabilities(GLProfile glp)
Creates a GLCapabilities object. |
|
| Method Summary | |
|---|---|
Object |
clone()
|
Object |
cloneMutable()
|
int |
compareTo(CapabilitiesImmutable o)
comparing hw/sw, stereo, multisample, stencil, RGBA and depth only |
GLCapabilities |
copyFrom(GLCapabilitiesImmutable source)
Copies all GLCapabilities and Capabilities values
from source into this instance. |
boolean |
equals(Object obj)
|
int |
getAccumAlphaBits()
Returns the number of bits for the accumulation buffer's alpha component. |
int |
getAccumBlueBits()
Returns the number of bits for the accumulation buffer's blue component. |
int |
getAccumGreenBits()
Returns the number of bits for the accumulation buffer's green component. |
int |
getAccumRedBits()
Returns the number of bits for the accumulation buffer's red component. |
int |
getDepthBits()
Returns the number of depth buffer bits. |
boolean |
getDoubleBuffered()
Returns whether double-buffering is requested, available or chosen. |
GLProfile |
getGLProfile()
Returns the GL profile you desire or used by the drawable. |
boolean |
getHardwareAccelerated()
Returns whether hardware acceleration is requested, available or chosen. |
int |
getNumSamples()
Returns the number of sample buffers to be allocated if sample buffers are enabled, otherwise returns 0. |
boolean |
getPbufferFloatingPointBuffers()
For pbuffers only, returns whether floating-point buffers should be used if available. |
boolean |
getPbufferRenderToTexture()
For pbuffers only, returns whether the render-to-texture extension should be used if available. |
boolean |
getPbufferRenderToTextureRectangle()
For pbuffers only, returns whether the render-to-texture extension should be used. |
boolean |
getSampleBuffers()
Returns whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawable. |
String |
getSampleExtension()
Returns the extension for full-scene antialiasing (FSAA). |
int |
getStencilBits()
Returns the number of stencil buffer bits. |
boolean |
getStereo()
Returns whether stereo is requested, available or chosen. |
int |
hashCode()
|
boolean |
isFBO()
Returns whether FBO offscreen mode is requested, available or chosen. |
boolean |
isPBuffer()
Returns whether pbuffer offscreen mode is requested, available or chosen. |
void |
setAccumAlphaBits(int accumAlphaBits)
Sets number of bits requested for accumulation buffer's alpha component. |
void |
setAccumBlueBits(int accumBlueBits)
Sets the number of bits requested for the accumulation buffer's blue component. |
void |
setAccumGreenBits(int accumGreenBits)
Sets the number of bits requested for the accumulation buffer's green component. |
void |
setAccumRedBits(int accumRedBits)
Sets the number of bits requested for the accumulation buffer's red component. |
void |
setDepthBits(int depthBits)
Sets the number of bits requested for the depth buffer. |
void |
setDoubleBuffered(boolean enable)
Enables or disables double buffering. |
void |
setFBO(boolean enable)
Requesting offscreen FBO mode. |
void |
setGLProfile(GLProfile profile)
Sets the GL profile you desire |
void |
setHardwareAccelerated(boolean enable)
Enables or disables hardware acceleration. |
void |
setNumSamples(int numSamples)
If sample buffers are enabled, indicates the number of buffers to be allocated. |
void |
setPBuffer(boolean enable)
Requesting offscreen pbuffer mode. |
void |
setPbufferFloatingPointBuffers(boolean enable)
For pbuffers only, indicates whether floating-point buffers should be used if available. |
void |
setPbufferRenderToTexture(boolean enable)
For pbuffers only, indicates whether the render-to-texture extension should be used if available. |
void |
setPbufferRenderToTextureRectangle(boolean enable)
For pbuffers only, indicates whether the render-to-texture-rectangle extension should be used if available. |
void |
setSampleBuffers(boolean enable)
Defaults to false. Indicates whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawable. Mind that this requires the alpha component. If enabled this method also invokes setAlphaBits(1)
if Capabilities.getAlphaBits() == 0. |
void |
setSampleExtension(String se)
Sets the desired extension for full-scene antialiasing (FSAA), default is GLCapabilitiesImmutable.DEFAULT_SAMPLE_EXTENSION. |
void |
setStencilBits(int stencilBits)
Sets the number of bits requested for the stencil buffer. |
void |
setStereo(boolean enable)
Enables or disables stereo viewing. |
String |
toString()
Returns a textual representation of this GLCapabilities object. |
StringBuilder |
toString(StringBuilder sink)
|
| Methods inherited from class javax.media.nativewindow.Capabilities |
|---|
copyFrom, getAlphaBits, getBlueBits, getGreenBits, getRedBits, getTransparentAlphaValue, getTransparentBlueValue, getTransparentGreenValue, getTransparentRedValue, getVisualID, isBackgroundOpaque, isBitmap, isOnscreen, setAlphaBits, setBackgroundOpaque, setBitmap, setBlueBits, setGreenBits, setOnscreen, setRedBits, setTransparentAlphaValue, setTransparentBlueValue, setTransparentGreenValue, setTransparentRedValue |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.media.nativewindow.CapabilitiesImmutable |
|---|
getAlphaBits, getBlueBits, getGreenBits, getRedBits, getTransparentAlphaValue, getTransparentBlueValue, getTransparentGreenValue, getTransparentRedValue, isBackgroundOpaque, isBitmap, isOnscreen |
| Methods inherited from interface javax.media.nativewindow.VisualIDHolder |
|---|
getVisualID |
| Constructor Detail |
|---|
public GLCapabilities(GLProfile glp)
throws GLException
glp - GLProfile, or null for the default GLProfile
GLException - if no profile is given and no default profile is available for the default device.| Method Detail |
|---|
public Object cloneMutable()
cloneMutable in interface WriteCloneablecloneMutable in class Capabilitiespublic Object clone()
clone in class Capabilitiespublic GLCapabilities copyFrom(GLCapabilitiesImmutable source)
GLCapabilities and Capabilities values
from source into this instance.
public int hashCode()
hashCode in interface CapabilitiesImmutablehashCode in interface GLCapabilitiesImmutablehashCode in class Capabilitiespublic boolean equals(Object obj)
equals in interface CapabilitiesImmutableequals in interface GLCapabilitiesImmutableequals in class Capabilitiespublic int compareTo(CapabilitiesImmutable o)
compareTo in interface Comparable<CapabilitiesImmutable>compareTo in class Capabilitiespublic final GLProfile getGLProfile()
GLCapabilitiesImmutable
getGLProfile in interface GLCapabilitiesImmutablepublic void setGLProfile(GLProfile profile)
public final boolean isPBuffer()
GLCapabilitiesImmutableDefault is false.
For chosen capabilities, only the selected offscreen surface is set to true.
isPBuffer in interface GLCapabilitiesImmutablepublic void setPBuffer(boolean enable)
If enabled this method also invokes setOnscreen(false).
Defaults to false.
Requesting offscreen pbuffer mode disables the offscreen auto selection.
public final boolean isFBO()
GLCapabilitiesImmutableDefault is false.
For chosen capabilities, only the selected offscreen surface is set to true.
isFBO in interface GLCapabilitiesImmutablepublic void setFBO(boolean enable)
If enabled this method also invokes setOnscreen(false).
Defaults to false.
Requesting offscreen FBO mode disables the offscreen auto selection.
public final boolean getDoubleBuffered()
GLCapabilitiesImmutableDefault is true.
getDoubleBuffered in interface GLCapabilitiesImmutablepublic void setDoubleBuffered(boolean enable)
public final boolean getStereo()
GLCapabilitiesImmutableDefault is false.
getStereo in interface GLCapabilitiesImmutablepublic void setStereo(boolean enable)
public final boolean getHardwareAccelerated()
GLCapabilitiesImmutableDefault is true.
getHardwareAccelerated in interface GLCapabilitiesImmutablepublic void setHardwareAccelerated(boolean enable)
public final int getDepthBits()
GLCapabilitiesImmutable
getDepthBits in interface GLCapabilitiesImmutablepublic void setDepthBits(int depthBits)
public final int getStencilBits()
GLCapabilitiesImmutableDefault is 0.
getStencilBits in interface GLCapabilitiesImmutablepublic void setStencilBits(int stencilBits)
public final int getAccumRedBits()
GLCapabilitiesImmutable
getAccumRedBits in interface GLCapabilitiesImmutablepublic void setAccumRedBits(int accumRedBits)
public final int getAccumGreenBits()
GLCapabilitiesImmutable
getAccumGreenBits in interface GLCapabilitiesImmutablepublic void setAccumGreenBits(int accumGreenBits)
public final int getAccumBlueBits()
GLCapabilitiesImmutable
getAccumBlueBits in interface GLCapabilitiesImmutablepublic void setAccumBlueBits(int accumBlueBits)
public final int getAccumAlphaBits()
GLCapabilitiesImmutable
getAccumAlphaBits in interface GLCapabilitiesImmutablepublic void setAccumAlphaBits(int accumAlphaBits)
public void setSampleExtension(String se)
GLCapabilitiesImmutable.DEFAULT_SAMPLE_EXTENSION.
public final String getSampleExtension()
GLCapabilitiesImmutable
Default is GLCapabilitiesImmutable.DEFAULT_SAMPLE_EXTENSION.
getSampleExtension in interface GLCapabilitiesImmutablepublic void setSampleBuffers(boolean enable)
setAlphaBits(1)
if Capabilities.getAlphaBits() == 0.
public final boolean getSampleBuffers()
GLCapabilitiesImmutableDefault is false.
getSampleBuffers in interface GLCapabilitiesImmutablepublic void setNumSamples(int numSamples)
getNumSamples()public final int getNumSamples()
GLCapabilitiesImmutableDefault is 0 due to disable sample buffers per default.
getNumSamples in interface GLCapabilitiesImmutablepublic void setPbufferFloatingPointBuffers(boolean enable)
public final boolean getPbufferFloatingPointBuffers()
GLCapabilitiesImmutableDefault is false.
getPbufferFloatingPointBuffers in interface GLCapabilitiesImmutablepublic void setPbufferRenderToTexture(boolean enable)
public final boolean getPbufferRenderToTexture()
GLCapabilitiesImmutableDefault is false.
getPbufferRenderToTexture in interface GLCapabilitiesImmutablepublic void setPbufferRenderToTextureRectangle(boolean enable)
public final boolean getPbufferRenderToTextureRectangle()
GLCapabilitiesImmutableDefault is false.
getPbufferRenderToTextureRectangle in interface GLCapabilitiesImmutablepublic StringBuilder toString(StringBuilder sink)
toString in interface CapabilitiesImmutabletoString in class Capabilitiespublic String toString()
toString in interface CapabilitiesImmutabletoString in interface GLCapabilitiesImmutabletoString in class Capabilities
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||