ork::SetStateTask Class Reference
[scenegraph]

An AbstractTask to set the state of a framebuffer. More...

#include <SetStateTask.h>

Inheritance diagram for ork::SetStateTask:
ork::AbstractTask ork::TaskFactory ork::Object

List of all members.

Classes

class  Runnable
 A 'subtask' of this task. More...

Public Member Functions

 SetStateTask ()
 Creates an empty SetStateTask.
virtual ~SetStateTask ()
 Deletes this SetStateTask.
void addRunnable (Runnable *r)
 Adds a 'subtask' to this task.
void setViewport (vec4< GLint > viewport)
 Sets the viewport (up, down, left and right planes).
void setDepthRange (GLfloat n, GLfloat f)
 Sets the depth range (near and far planes).
void setClipDistances (GLint d)
 Sets the clipping bits, used to determine which planes will be used for clipping.
void setClearColor (vec4< GLfloat > &c)
 Sets the color used to clear the current draw buffer.
void setClearDepth (GLfloat clearDepth)
 Sets the depth used to clear the current depth buffer.
void setClearStencil (GLint clearStencil)
 Sets the stencil used to clear the current stencil buffer.
void setPointSize (GLfloat pointSize)
 Sets the point primitive's size.
void setPointFadeThresholdSize (GLfloat tSize)
 Sets the maximum size of a point.
void setPointLowerLeftOrigin (bool pointLowerLeftOrigin)
 Sets the origin corner of a point.
void setLineWidth (GLfloat lineWidth)
 Sets the line primitive's width.
void setLineSmooth (bool lineSmooth)
 Enables or disables the AA on line drawing.
void setFrontFaceCW (bool frontFaceCW)
 Determines the orientation of front faces.
void setPolygonMode (PolygonMode polygonFront, PolygonMode polygonBack)
 Sets the polygon mode for front and back faces.
void setPolygonSmooth (bool polygonSmooth)
 Enables or disables AA on polygon drawing.
void setPolygonOffset (GLfloat factor, GLfloat units)
 Sets the factor and units when using offsets on primitives.
void setPolygonOffset (bool pointOffset, bool lineOffset, bool polygonOffset)
 Determines which primitives should be offset.
void setMultisample (bool multiSample)
 Enables or disables multisampling.
void setSampleAlpha (bool sampleAlphaToCoverage, bool sampleAlphaToOne)
 Sets sampling filter options.
void setSampleCoverage (GLfloat sampleCoverage)
 Sets sampling coverage.
void setSampleMask (GLint sampleMask)
 Sets sampling mask.
void setSampleShading (bool sampleShading, GLfloat minSamples)
 Enables or disables AA on multisampling.
void setOcclusionTest (ptr< Query > occlusionQuery, QueryMode occlusionMode)
 Adds an occlusion query.
void setScissorTest (bool enableScissor)
 Enables or disables scissor test.
void setScissorTest (bool enableScissor, vec4< GLint > &scissor)
 Enables or disables scissor test.
void setStencilTest (bool enableStencil, Function ff=(Function)-1, GLint fref=-1, GLint fmask=-1, StencilOperation ffail=(StencilOperation)-1, StencilOperation fdpfail=(StencilOperation)-1, StencilOperation fdppass=(StencilOperation)-1, Function bf=(Function)-1, GLint bref=-1, GLint bmask=-1, StencilOperation bfail=(StencilOperation)-1, StencilOperation bdpfail=(StencilOperation)-1, StencilOperation bdppass=(StencilOperation)-1)
 Enables or disables stencil test.
void setDepthTest (bool enableDepth, Function depth=(Function)-1)
 Enables or disables depth test.
void setBlend (BufferId buffer, bool enableBlend, BlendEquation rgb=(BlendEquation)-1, BlendArgument srgb=(BlendArgument)-1, BlendArgument drgb=(BlendArgument)-1, BlendEquation alpha=(BlendEquation)-1, BlendArgument salpha=(BlendArgument)-1, BlendArgument dalpha=(BlendArgument)-1)
 Enables or disables blending.
void setBlendColor (vec4< GLfloat > &color)
 Sets Blend color parameter.
void setDither (bool enableDither)
 Enables or disables dithering.
void setLogicOp (bool enableLogic, LogicOperation logicOp=(LogicOperation)-1)
 Enables or disables logical operation.
void setColorMask (BufferId buffer, bool r, bool g, bool b, bool a)
 Sets color buffer's writing mask.
void setDepthMask (bool d)
 Sets depth buffer's writing mask.
void setStencilMask (GLint frontMask, GLint backMask)
 Sets stencil buffer's writing mask.
void setClearState (bool color, bool stencil, bool depth)
 Sets the color, stencil and depth used to clear the current draw buffer.
void setBuffers (BufferId rb, BufferId db)
 Sets the read and draw buffers.
virtual ptr< TaskgetTask (ptr< Object > context)
 Creates a new task.

Protected Member Functions

void swap (ptr< SetStateTask > t)
 Swaps this SetStateTask with the given one.

Detailed Description

An AbstractTask to set the state of a framebuffer.


Constructor & Destructor Documentation

ork::SetStateTask::SetStateTask (  ) 

Creates an empty SetStateTask.

virtual ork::SetStateTask::~SetStateTask (  )  [virtual]

Deletes this SetStateTask.


Member Function Documentation

void ork::SetStateTask::addRunnable ( Runnable r  ) 

Adds a 'subtask' to this task.

Parameters:
r a 'subtask' to be added to this task.
virtual ptr<Task> ork::SetStateTask::getTask ( ptr< Object context  )  [virtual]

Creates a new task.

Parameters:
context an optional parameter to control the task creation.
Returns:
the created task.

Implements ork::TaskFactory.

void ork::SetStateTask::setBlend ( BufferId  buffer,
bool  enableBlend,
BlendEquation  rgb = (BlendEquation)-1,
BlendArgument  srgb = (BlendArgument)-1,
BlendArgument  drgb = (BlendArgument)-1,
BlendEquation  alpha = (BlendEquation)-1,
BlendArgument  salpha = (BlendArgument)-1,
BlendArgument  dalpha = (BlendArgument)-1 
)

Enables or disables blending.

Parameters:
buffer the buffer whose blending options must be changed.
enableBlend true to enable blending.
rgb the color blending equation.
srgb the source color blending argument.
drgb the destination color blending argument.
alpha the alpha blending equation.
salpha the source alpha blending argument.
dalpha the destination alpha blending argument.
void ork::SetStateTask::setBlendColor ( vec4< GLfloat > &  color  ) 

Sets Blend color parameter.

void ork::SetStateTask::setBuffers ( BufferId  rb,
BufferId  db 
)

Sets the read and draw buffers.

void ork::SetStateTask::setClearColor ( vec4< GLfloat > &  c  ) 

Sets the color used to clear the current draw buffer.

void ork::SetStateTask::setClearDepth ( GLfloat  clearDepth  ) 

Sets the depth used to clear the current depth buffer.

void ork::SetStateTask::setClearState ( bool  color,
bool  stencil,
bool  depth 
)

Sets the color, stencil and depth used to clear the current draw buffer.

void ork::SetStateTask::setClearStencil ( GLint  clearStencil  ) 

Sets the stencil used to clear the current stencil buffer.

void ork::SetStateTask::setClipDistances ( GLint  d  ) 

Sets the clipping bits, used to determine which planes will be used for clipping.

void ork::SetStateTask::setColorMask ( BufferId  buffer,
bool  r,
bool  g,
bool  b,
bool  a 
)

Sets color buffer's writing mask.

void ork::SetStateTask::setDepthMask ( bool  d  ) 

Sets depth buffer's writing mask.

void ork::SetStateTask::setDepthRange ( GLfloat  n,
GLfloat  f 
)

Sets the depth range (near and far planes).

Parameters:
n near plane.
f far plane.
void ork::SetStateTask::setDepthTest ( bool  enableDepth,
Function  depth = (Function)-1 
)

Enables or disables depth test.

void ork::SetStateTask::setDither ( bool  enableDither  ) 

Enables or disables dithering.

void ork::SetStateTask::setFrontFaceCW ( bool  frontFaceCW  ) 

Determines the orientation of front faces.

Parameters:
frontFaceCW if true, clockwise faces will be front faces.
void ork::SetStateTask::setLineSmooth ( bool  lineSmooth  ) 

Enables or disables the AA on line drawing.

void ork::SetStateTask::setLineWidth ( GLfloat  lineWidth  ) 

Sets the line primitive's width.

void ork::SetStateTask::setLogicOp ( bool  enableLogic,
LogicOperation  logicOp = (LogicOperation)-1 
)

Enables or disables logical operation.

void ork::SetStateTask::setMultisample ( bool  multiSample  ) 

Enables or disables multisampling.

void ork::SetStateTask::setOcclusionTest ( ptr< Query occlusionQuery,
QueryMode  occlusionMode 
)

Adds an occlusion query.

void ork::SetStateTask::setPointFadeThresholdSize ( GLfloat  tSize  ) 

Sets the maximum size of a point.

void ork::SetStateTask::setPointLowerLeftOrigin ( bool  pointLowerLeftOrigin  ) 

Sets the origin corner of a point.

void ork::SetStateTask::setPointSize ( GLfloat  pointSize  ) 

Sets the point primitive's size.

void ork::SetStateTask::setPolygonMode ( PolygonMode  polygonFront,
PolygonMode  polygonBack 
)

Sets the polygon mode for front and back faces.

Parameters:
polygonFront drawing mode for front faces.
polygonBack drawing mode for back faces.
void ork::SetStateTask::setPolygonOffset ( bool  pointOffset,
bool  lineOffset,
bool  polygonOffset 
)

Determines which primitives should be offset.

void ork::SetStateTask::setPolygonOffset ( GLfloat  factor,
GLfloat  units 
)

Sets the factor and units when using offsets on primitives.

void ork::SetStateTask::setPolygonSmooth ( bool  polygonSmooth  ) 

Enables or disables AA on polygon drawing.

void ork::SetStateTask::setSampleAlpha ( bool  sampleAlphaToCoverage,
bool  sampleAlphaToOne 
)

Sets sampling filter options.

void ork::SetStateTask::setSampleCoverage ( GLfloat  sampleCoverage  ) 

Sets sampling coverage.

void ork::SetStateTask::setSampleMask ( GLint  sampleMask  ) 

Sets sampling mask.

void ork::SetStateTask::setSampleShading ( bool  sampleShading,
GLfloat  minSamples 
)

Enables or disables AA on multisampling.

void ork::SetStateTask::setScissorTest ( bool  enableScissor,
vec4< GLint > &  scissor 
)

Enables or disables scissor test.

void ork::SetStateTask::setScissorTest ( bool  enableScissor  ) 

Enables or disables scissor test.

void ork::SetStateTask::setStencilMask ( GLint  frontMask,
GLint  backMask 
)

Sets stencil buffer's writing mask.

void ork::SetStateTask::setStencilTest ( bool  enableStencil,
Function  ff = (Function)-1,
GLint  fref = -1,
GLint  fmask = -1,
StencilOperation  ffail = (StencilOperation)-1,
StencilOperation  fdpfail = (StencilOperation)-1,
StencilOperation  fdppass = (StencilOperation)-1,
Function  bf = (Function)-1,
GLint  bref = -1,
GLint  bmask = -1,
StencilOperation  bfail = (StencilOperation)-1,
StencilOperation  bdpfail = (StencilOperation)-1,
StencilOperation  bdppass = (StencilOperation)-1 
)

Enables or disables stencil test.

Parameters:
enableStencil true to enable the stencil test.
ff the front face function.
fref the front face reference value.
fmask the front face stencil mask.
ffail the stencil operation used when failing stencil test on front faces.
fdpfail the stencil operation used when passing stencil test but failing depth test on front faces.
fdppass the stencil operation used when passing both stencil and depth tests on front faces.
bf the back face function.
bref the back face reference value.
bmask the back face stencil mask.
bfail the stencil operation used when failing stencil test on back faces.
bdpfail the stencil operation used when passing stencil test but failing depth test on back faces.
bdppass the stencil operation used when passing both stencil and depth tests on back faces.
void ork::SetStateTask::setViewport ( vec4< GLint >  viewport  ) 

Sets the viewport (up, down, left and right planes).

Parameters:
viewport the new viewport.
void ork::SetStateTask::swap ( ptr< SetStateTask t  )  [protected]

Swaps this SetStateTask with the given one.

Parameters:
t a SetStateTask.

Generated on Mon Oct 18 09:36:11 2010 for ork by  doxygen 1.6.1