net.java.games.jogl

Class GLCapabilities

Implemented Interfaces:
Cloneable

public class GLCapabilities
extends java.lang.Object
implements Cloneable

Specifies a set of OpenGL capabilities that a rendering context must support, such as color depth and whether stereo is enabled. It currently contains the minimal number of routines which allow configuration on all supported window systems.

Constructor Summary

GLCapabilities()
Creates a GLCapabilities object.

Method Summary

Object
clone()
int
getAccumAlphaBits()
Returns the number of bits requested for the accumulation buffer's alpha component.
int
getAccumBlueBits()
Returns the number of bits requested for the accumulation buffer's blue component.
int
getAccumGreenBits()
Returns the number of bits requested for the accumulation buffer's green component.
int
getAccumRedBits()
Returns the number of bits requested for the accumulation buffer's red component.
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
getDepthBits()
Returns the number of bits requested for the depth buffer.
boolean
getDoubleBuffered()
Indicates whether double-buffering is enabled.
int
getGreenBits()
Returns the number of bits requested for the color buffer's green component.
boolean
getHardwareAccelerated()
Indicates whether hardware acceleration is enabled.
int
getNumSamples()
Returns the number of sample buffers to be allocated if sample buffers are enabled.
boolean
getOffscreenFloatingPointBuffers()
For offscreen surfaces only (pbuffers), returns whether floating-point buffers should be used if available.
boolean
getOffscreenRenderToTexture()
For offscreen surfaces only (pbuffers), returns whether the render-to-texture extension should be used if available.
boolean
getOffscreenRenderToTextureRectangle()
For offscreen surfaces only (pbuffers), returns whether the render-to-texture extension should be used.
int
getRedBits()
Returns the number of bits requested for the color buffer's red component.
boolean
getSampleBuffers()
Returns whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawable.
int
getStencilBits()
Returns the number of bits requested for the stencil buffer.
boolean
getStereo()
Indicates whether stereo is enabled.
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
setAlphaBits(int alphaBits)
Sets the number of bits requested for the color buffer's alpha component.
void
setBlueBits(int blueBits)
Sets the number of bits requested for the color buffer's blue component.
void
setDepthBits(int depthBits)
Sets the number of bits requested for the depth buffer.
void
setDoubleBuffered(boolean onOrOff)
Enables or disables double buffering.
void
setGreenBits(int greenBits)
Sets the number of bits requested for the color buffer's green component.
void
setHardwareAccelerated(boolean onOrOff)
Enables or disables hardware acceleration.
void
setNumSamples(int numSamples)
If sample buffers are enabled, indicates the number of buffers to be allocated.
void
setOffscreenFloatingPointBuffers(boolean onOrOff)
For offscreen surfaces only (pbuffers), indicates whether floating-point buffers should be used if available.
void
setOffscreenRenderToTexture(boolean onOrOff)
For offscreen surfaces only (pbuffers), indicates whether the render-to-texture extension should be used if available.
void
setOffscreenRenderToTextureRectangle(boolean onOrOff)
For offscreen surfaces only (pbuffers), indicates whether the render-to-texture-rectangle extension should be used if available.
void
setRedBits(int redBits)
Sets the number of bits requested for the color buffer's red component.
void
setSampleBuffers(boolean onOrOff)
Indicates whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawable.
void
setStencilBits(int stencilBits)
Sets the number of bits requested for the stencil buffer.
void
setStereo(boolean onOrOff)
Enables or disables stereo viewing.
String
toString()
Returns a textual representation of this GLCapabilities object.

Constructor Details

GLCapabilities

public GLCapabilities()
Creates a GLCapabilities object. All attributes are in a default state.

Method Details

clone

public Object clone()

getAccumAlphaBits

public int getAccumAlphaBits()
Returns the number of bits requested for the accumulation buffer's alpha component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.

getAccumBlueBits

public int getAccumBlueBits()
Returns the number of bits requested for the accumulation buffer's blue component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.

getAccumGreenBits

public int getAccumGreenBits()
Returns the number of bits requested for the accumulation buffer's green component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.

getAccumRedBits

public int getAccumRedBits()
Returns the number of bits requested for the accumulation buffer's red component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.

getAlphaBits

public int getAlphaBits()
Returns 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.

getBlueBits

public int getBlueBits()
Returns 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.

getDepthBits

public int getDepthBits()
Returns the number of bits requested for the depth buffer.

getDoubleBuffered

public boolean getDoubleBuffered()
Indicates whether double-buffering is enabled.

getGreenBits

public int getGreenBits()
Returns 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.

getHardwareAccelerated

public boolean getHardwareAccelerated()
Indicates whether hardware acceleration is enabled.

getNumSamples

public int getNumSamples()
Returns the number of sample buffers to be allocated if sample buffers are enabled. Defaults to 2.

getOffscreenFloatingPointBuffers

public boolean getOffscreenFloatingPointBuffers()
For offscreen surfaces only (pbuffers), returns whether floating-point buffers should be used if available. Defaults to false.

getOffscreenRenderToTexture

public boolean getOffscreenRenderToTexture()
For offscreen surfaces only (pbuffers), returns whether the render-to-texture extension should be used if available. Defaults to false.

getOffscreenRenderToTextureRectangle

public boolean getOffscreenRenderToTextureRectangle()
For offscreen surfaces only (pbuffers), returns whether the render-to-texture extension should be used. Defaults to false.

getRedBits

public int getRedBits()
Returns 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.

getSampleBuffers

public boolean getSampleBuffers()
Returns whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawable. Defaults to false.

getStencilBits

public int getStencilBits()
Returns the number of bits requested for the stencil buffer.

getStereo

public boolean getStereo()
Indicates whether stereo is enabled.

setAccumAlphaBits

public void setAccumAlphaBits(int accumAlphaBits)
Sets number of bits requested for accumulation buffer's alpha component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.

setAccumBlueBits

public void setAccumBlueBits(int accumBlueBits)
Sets the number of bits requested for the accumulation buffer's blue component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.

setAccumGreenBits

public void setAccumGreenBits(int accumGreenBits)
Sets the number of bits requested for the accumulation buffer's green component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.

setAccumRedBits

public void setAccumRedBits(int accumRedBits)
Sets the number of bits requested for the accumulation buffer's red component. On some systems only the accumulation buffer depth, which is the sum of the red, green, and blue bits, is considered.

setAlphaBits

public void setAlphaBits(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.

setBlueBits

public void setBlueBits(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.

setDepthBits

public void setDepthBits(int depthBits)
Sets the number of bits requested for the depth buffer.

setDoubleBuffered

public void setDoubleBuffered(boolean onOrOff)
Enables or disables double buffering.

setGreenBits

public void setGreenBits(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.

setHardwareAccelerated

public void setHardwareAccelerated(boolean onOrOff)
Enables or disables hardware acceleration.

setNumSamples

public void setNumSamples(int numSamples)
If sample buffers are enabled, indicates the number of buffers to be allocated. Defaults to 2.

setOffscreenFloatingPointBuffers

public void setOffscreenFloatingPointBuffers(boolean onOrOff)
For offscreen surfaces only (pbuffers), indicates whether floating-point buffers should be used if available. Defaults to false.

setOffscreenRenderToTexture

public void setOffscreenRenderToTexture(boolean onOrOff)
For offscreen surfaces only (pbuffers), indicates whether the render-to-texture extension should be used if available. Defaults to false.

setOffscreenRenderToTextureRectangle

public void setOffscreenRenderToTextureRectangle(boolean onOrOff)
For offscreen surfaces only (pbuffers), indicates whether the render-to-texture-rectangle extension should be used if available. Defaults to false.

setRedBits

public void setRedBits(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.

setSampleBuffers

public void setSampleBuffers(boolean onOrOff)
Indicates whether sample buffers for full-scene antialiasing (FSAA) should be allocated for this drawable. Defaults to false.

setStencilBits

public void setStencilBits(int stencilBits)
Sets the number of bits requested for the stencil buffer.

setStereo

public void setStereo(boolean onOrOff)
Enables or disables stereo viewing.

toString

public String toString()
Returns a textual representation of this GLCapabilities object.