Aviatrix3D
2.1.0

org.j3d.aviatrix3d.rendering
Class BufferSetupData

java.lang.Object
  extended by org.j3d.aviatrix3d.rendering.BufferSetupData

public class BufferSetupData
extends java.lang.Object

Internal representation of the various states that a buffer can request for its rendering.

Version:
$Revision: 2.3 $
Author:
Justin Couch

Constructor Summary
BufferSetupData()
          Create a default instance of the buffer setup data.
 
Method Summary
 void enableFloatingPointColorBuffer(boolean enable)
          Set the enabled state of floating point colour buffers.
 void enableUnclampedColorBuffer(boolean enable)
          Set the enabled state of clamped colour values.
 int getDepthBits()
          Return the number of bits that should be used in the depth buffer implementation.
 int getNumAASamples()
          Return the number of samples that should be used for FSAA.
 int getNumRenderTargets()
          Return the number render targets that should be used for this buffer.
 int getRenderTargetIndex()
          Return the index of the render target this represents
 int getStencilBits()
          Return the number of bits that should be used in the stencil buffer implementation.
 void setDepthBits(int depth)
          Set the number of bits of precsions the depth buffer should have.
 void setNumAASamples(int samples)
          Set the number of samples that should be used for full screen antialiasing.
 void setNumRenderTargets(int count)
          Set the number of render targets to create in the underlying buffer.
 void setRenderTargetIndex(int index)
          Set the index of this buffer's render target in the underlying FBO.
 void setStencilBits(int depth)
          Set the number of bit planes to use in the stencil buffer.
 boolean useFloatingPointColorBuffer()
          Enable the use of floating point colour buffers rather than fixed point of the default GL pipeline.
 boolean useUnclampedColorBuffer()
          Enable the use of unclamped floating point colour buffers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferSetupData

public BufferSetupData()
Create a default instance of the buffer setup data.

Method Detail

enableFloatingPointColorBuffer

public void enableFloatingPointColorBuffer(boolean enable)
Set the enabled state of floating point colour buffers. Default is that they are disabled.

Parameters:
enable - True to enable the use of colour buffers

useFloatingPointColorBuffer

public boolean useFloatingPointColorBuffer()
Enable the use of floating point colour buffers rather than fixed point of the default GL pipeline.

Returns:
true to use the floating point version

enableUnclampedColorBuffer

public void enableUnclampedColorBuffer(boolean enable)
Set the enabled state of clamped colour values. Default is that they are disabled.

Parameters:
enable - True to remove the clamping of colour values in the output

useUnclampedColorBuffer

public boolean useUnclampedColorBuffer()
Enable the use of unclamped floating point colour buffers. Only used if useFloatingPointColorBuffer() returns true. Ignored otherwise. Defaults to returning false to mimic traditional GL fixed point pipeline behaviour.

Returns:
true to use an unclamped colour buffer mode
See Also:
ARB Color buffer spec

setDepthBits

public void setDepthBits(int depth)
Set the number of bits of precsions the depth buffer should have. Not sanity checking is performed, but it should be a multiple of 8. If a value of 0 is provided the depth buffer will be disabled for this buffer.

Parameters:
depth - The number of bits to use. Should be 0, 16, 24 or 32

getDepthBits

public int getDepthBits()
Return the number of bits that should be used in the depth buffer implementation. If the value is 0, do not enable the depth buffer for this buffer. Default return value is 16 to match the most common usage in OpenGL implementations.

Returns:
Zero or positive number

setStencilBits

public void setStencilBits(int depth)
Set the number of bit planes to use in the stencil buffer. A value of 0 will disable the use of stencil buffers for this buffer. Typical value should be a multiple of 8. Most implementations only provide 8 bits of stencil depth. No sanity checking is performed on the requested depth.

Parameters:
depth - The stencil bit depth to use

getStencilBits

public int getStencilBits()
Return the number of bits that should be used in the stencil buffer implementation. If the value is 0, do not enable the stencil buffer for this buffer.

Returns:
Zero or positive number

setNumAASamples

public void setNumAASamples(int samples)
Set the number of samples that should be used for full screen antialiasing. The default value of 0 disables FSAA.

Parameters:
samples - The number of samples to use. Should be a positive power of two or zero to disable

getNumAASamples

public int getNumAASamples()
Return the number of samples that should be used for FSAA. If the number is 0, don't use FSAA. The default value is 0.

Returns:
Zero or positive number

setNumRenderTargets

public void setNumRenderTargets(int count)
Set the number of render targets to create in the underlying buffer.

Parameters:
count - The number of targets to use

getNumRenderTargets

public int getNumRenderTargets()
Return the number render targets that should be used for this buffer.

Returns:
Zero or positive number

setRenderTargetIndex

public void setRenderTargetIndex(int index)
Set the index of this buffer's render target in the underlying FBO.

Parameters:
index - The index of this render target

getRenderTargetIndex

public int getRenderTargetIndex()
Return the index of the render target this represents

Returns:
Zero or positive number

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org