Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osgUtil::RenderStage Class Reference

RenderState base class. More...

Inheritance diagram for osgUtil::RenderStage:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::vector< osg::ref_ptr<
RenderStage > > 
DependencyList

Public Methods

 RenderStage ()
virtual osg::ObjectcloneType () const
 Clone the type of an object, with Object* return type.

virtual osg::Objectclone (const osg::CopyOp &) const
virtual bool isSameKindAs (const osg::Object *obj) const
virtual const char * className () const
 return the name of the object's class type.

virtual void reset ()
void setViewport (osg::Viewport *viewport)
 Set the viewport.

const osg::ViewportgetViewport () const
 Get the const viewport.

osg::ViewportgetViewport ()
 Get the viewport.

void setClearMask (const GLbitfield mask)
 Set the clear mask used in glClear(..).

const GLbitfield getClearMask () const
 Get the clear mask.

void setColorMask (osg::ColorMask *cm)
osg::ColorMaskgetColorMask ()
const osg::ColorMaskgetColorMask () const
void setClearColor (const osg::Vec4 &color)
 Set the clear color used in glClearColor(..).

const osg::Vec4getClearColor () const
 Get the clear color.

void setClearAccum (const osg::Vec4 &color)
 Set the clear accum used in glClearAccum(..).

const osg::Vec4getClearAccum () const
 Get the clear accum.

void setClearDepth (const double depth)
 Set the clear depth used in glClearDepth(..).

const double getClearDepth () const
 Get the clear depth.

void setClearStencil (const int stencil)
 Set the clear stencil value used in glClearStencil().

const int getClearStencil () const
 Get the clear color.

void setRenderStageLighting (RenderStageLighting *rsl)
RenderStageLightinggetRenderStageLighting () const
virtual void addPositionedAttribute (osg::Matrix *matrix, const osg::StateAttribute *attr)
virtual void draw (osg::State &state, RenderLeaf *&previous)
void addToDependencyList (RenderStage *rs)
bool getStats (osg::Statistics *primStats)
 extract stats for current draw list.


Public Attributes

bool _stageDrawnThisFrame
DependencyList _dependencyList
osg::ref_ptr< osg::Viewport_viewport
GLbitfield _clearMask
osg::ref_ptr< osg::ColorMask_colorMask
osg::Vec4 _clearColor
osg::Vec4 _clearAccum
double _clearDepth
int _clearStencil
osg::ref_ptr< RenderStageLighting_renderStageLighting

Protected Methods

virtual ~RenderStage ()

Detailed Description

RenderState base class.

Used for encapsulate a complete stage in rendering - setting up of viewport, the projection and model matrices and rendering the RenderBin's enclosed with this RenderStage. RenderStage also has a dependency list of other RenderStages, each of which must be called before the rendering of this stage. These 'pre' rendering stages are used for advanced rendering techniques like multistage pixel shading or impostors.


Member Typedef Documentation

typedef std::vector< osg::ref_ptr<RenderStage> > osgUtil::RenderStage::DependencyList
 


Constructor & Destructor Documentation

osgUtil::RenderStage::RenderStage  
 

virtual osgUtil::RenderStage::~RenderStage   [protected, virtual]
 


Member Function Documentation

virtual void osgUtil::RenderStage::addPositionedAttribute osg::Matrix   matrix,
const osg::StateAttribute   attr
[inline, virtual]
 

void osgUtil::RenderStage::addToDependencyList RenderStage *    rs
 

virtual const char* osgUtil::RenderStage::className   const [inline, virtual]
 

return the name of the object's class type.

Must be defined by derived classes.

Reimplemented from osgUtil::RenderBin.

Reimplemented in osgUtil::RenderToTextureStage.

virtual osg::Object* osgUtil::RenderStage::clone const osg::CopyOp   const [inline, virtual]
 

Reimplemented from osgUtil::RenderBin.

Reimplemented in osgUtil::RenderToTextureStage.

virtual osg::Object* osgUtil::RenderStage::cloneType   const [inline, virtual]
 

Clone the type of an object, with Object* return type.

Must be defined by derived classes.

Reimplemented from osgUtil::RenderBin.

Reimplemented in osgUtil::RenderToTextureStage.

virtual void osgUtil::RenderStage::draw osg::State   state,
RenderLeaf *&    previous
[virtual]
 

Reimplemented from osgUtil::RenderBin.

Reimplemented in osgUtil::RenderToTextureStage.

const osg::Vec4& osgUtil::RenderStage::getClearAccum   const [inline]
 

Get the clear accum.

const osg::Vec4& osgUtil::RenderStage::getClearColor   const [inline]
 

Get the clear color.

const double osgUtil::RenderStage::getClearDepth   const [inline]
 

Get the clear depth.

const GLbitfield osgUtil::RenderStage::getClearMask   const [inline]
 

Get the clear mask.

const int osgUtil::RenderStage::getClearStencil   const [inline]
 

Get the clear color.

const osg::ColorMask* osgUtil::RenderStage::getColorMask   const [inline]
 

osg::ColorMask* osgUtil::RenderStage::getColorMask   [inline]
 

RenderStageLighting* osgUtil::RenderStage::getRenderStageLighting   const [inline]
 

bool osgUtil::RenderStage::getStats osg::Statistics   primStats
 

extract stats for current draw list.

Reimplemented from osgUtil::RenderBin.

osg::Viewport* osgUtil::RenderStage::getViewport   [inline]
 

Get the viewport.

const osg::Viewport* osgUtil::RenderStage::getViewport   const [inline]
 

Get the const viewport.

virtual bool osgUtil::RenderStage::isSameKindAs const osg::Object   obj const [inline, virtual]
 

Reimplemented from osgUtil::RenderBin.

Reimplemented in osgUtil::RenderToTextureStage.

virtual void osgUtil::RenderStage::reset   [virtual]
 

Reimplemented from osgUtil::RenderBin.

Reimplemented in osgUtil::RenderToTextureStage.

void osgUtil::RenderStage::setClearAccum const osg::Vec4   color [inline]
 

Set the clear accum used in glClearAccum(..).

glClearAcumm is only called if mask & GL_ACCUM_BUFFER_BIT is true

void osgUtil::RenderStage::setClearColor const osg::Vec4   color [inline]
 

Set the clear color used in glClearColor(..).

glClearColor is only called if mask & GL_COLOR_BUFFER_BIT is true

void osgUtil::RenderStage::setClearDepth const double    depth [inline]
 

Set the clear depth used in glClearDepth(..).

Defaults to 1.0 glClearDepth is only called if mask & GL_DEPTH_BUFFER_BIT is true

void osgUtil::RenderStage::setClearMask const GLbitfield    mask [inline]
 

Set the clear mask used in glClear(..).

Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT.

void osgUtil::RenderStage::setClearStencil const int    stencil [inline]
 

Set the clear stencil value used in glClearStencil().

Defaults to 1.0 glClearStencil is only called if mask & GL_STENCIL_BUFFER_BIT is true

void osgUtil::RenderStage::setColorMask osg::ColorMask   cm [inline]
 

void osgUtil::RenderStage::setRenderStageLighting RenderStageLighting   rsl [inline]
 

void osgUtil::RenderStage::setViewport osg::Viewport   viewport [inline]
 

Set the viewport.


Member Data Documentation

osg::Vec4 osgUtil::RenderStage::_clearAccum
 

osg::Vec4 osgUtil::RenderStage::_clearColor
 

double osgUtil::RenderStage::_clearDepth
 

GLbitfield osgUtil::RenderStage::_clearMask
 

int osgUtil::RenderStage::_clearStencil
 

osg::ref_ptr<osg::ColorMask> osgUtil::RenderStage::_colorMask
 

DependencyList osgUtil::RenderStage::_dependencyList
 

osg::ref_ptr<RenderStageLighting> osgUtil::RenderStage::_renderStageLighting
 

bool osgUtil::RenderStage::_stageDrawnThisFrame
 

osg::ref_ptr<osg::Viewport> osgUtil::RenderStage::_viewport
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:56:01 2002 for the Open Scene Graph by doxygen 1.2.16.