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

# osgUtil::RenderStage Class Reference

RenderStage base class. More...

Inheritance diagram for osgUtil::RenderStage:

[legend]
List of all members.

## Public Member Functions
| RenderStage ()
| RenderStage (SortMode mode)
| RenderStage (const RenderStage &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual osg::Object * | cloneType () const
| Clone the type of an object, with Object* return type.
virtual osg::Object * | clone (const osg::CopyOp &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 | setDrawBuffer (GLenum buffer)
| Set the draw buffer used at the start of each frame draw.
GLenum | getDrawBuffer () const
| Get the draw buffer used at the start of each frame draw.
void | setReadBuffer (GLenum buffer)
| Set the read buffer for any required copy operations to use.
GLenum | getReadBuffer () const
| Get the read buffer for any required copy operations to use.
void | setViewport (osg::Viewport *viewport)
| Set the viewport.
const osg::Viewport * | getViewport () const
| Get the const viewport.
osg::Viewport * | getViewport ()
| Get the viewport.
void | setClearMask (GLbitfield mask)
| Set the clear mask used in glClear(..).
GLbitfield | getClearMask () const
| Get the clear mask.
void | setColorMask (osg::ColorMask *cm)
osg::ColorMask * | getColorMask ()
const osg::ColorMask * | getColorMask () const
void | setClearColor (const osg::Vec4 &color)
| Set the clear color used in glClearColor(..).
const osg::Vec4 & | getClearColor () const
| Get the clear color.
void | setClearAccum (const osg::Vec4 &color)
| Set the clear accum used in glClearAccum(..).
const osg::Vec4 & | getClearAccum () const
| Get the clear accum.
void | setClearDepth (double depth)
| Set the clear depth used in glClearDepth(..).
double | getClearDepth () const
| Get the clear depth.
void | setClearStencil (int stencil)
| Set the clear stencil value used in glClearStencil().
int | getClearStencil () const
| Get the clear color.
void | setCameraNode (osg::CameraNode *camera)
osg::CameraNode * | getCameraNode ()
const osg::CameraNode * | getCameraNode () const
void | setCameraRequiresSetUp (bool flag)
bool | getCameraRequiresSetUp () const
void | runCameraSetUp (osg::State &state)
| Attempt the set the RenderStage from the Camera settings.
void | setTexture (osg::Texture *texture, unsigned int level=0, unsigned int face=0)
osg::Texture * | getTexture ()
void | setImage (osg::Image *image)
osg::Image * | getImage ()
void | setImageReadPixelFormat (GLenum format)
GLenum | getImageReadPixelFormat () const
void | setImageReadPixelDataType (GLenum type)
GLenum | getImageReadPixelDataType () const
void | setFrameBufferObject (osg::FrameBufferObject *fbo)
osg::FrameBufferObject * | getFrameBufferObject ()
const osg::FrameBufferObject * | getFrameBufferObject () const
void | setGraphicsContext (osg::GraphicsContext *context)
osg::GraphicsContext * | getGraphicsContext ()
const osg::GraphicsContext * | getGraphicsContext () const
void | setInheritedPositionalStateContainerMatrix (const osg::Matrix &matrix)
const osg::Matrix & | getInheritedPositionalStateContainerMatrix () const
void | setInheritedPositionalStateContainer (PositionalStateContainer *rsl)
PositionalStateContainer * | getInheritedPositionalStateContainer ()
void | setPositionalStateContainer (PositionalStateContainer *rsl)
PositionalStateContainer * | getPositionalStateContainer () const
virtual void | addPositionedAttribute (osg::RefMatrix *matrix, const osg::StateAttribute *attr)
virtual void | addPositionedTextureAttribute (unsigned int textureUnit, osg::RefMatrix *matrix, const osg::StateAttribute *attr)
void | copyTexture (osg::State &state)
virtual void | sort ()
virtual void | drawPreRenderStages (osg::State &state, RenderLeaf *&previous)
virtual void | draw (osg::State &state, RenderLeaf *&previous)
virtual void | drawInner (osg::State &state, RenderLeaf *&previous, bool &doCopyTexture)
virtual void | drawPostRenderStages (osg::State &state, RenderLeaf *&previous)
virtual void | drawImplementation (osg::State &state, RenderLeaf *&previous)
void | addToDependencyList (RenderStage *rs)
void | addPreRenderStage (RenderStage *rs)
void | addPostRenderStage (RenderStage *rs)
bool | getStats (Statistics *primStats)
| Extract stats for current draw list.
## Protected Types
typedef std::vector< osg::ref_ptr< RenderStage > > | RenderStageList
## Protected Member Functions
virtual | ~RenderStage ()
## Protected Attributes
bool | _stageDrawnThisFrame
RenderStageList | _preRenderList
RenderStageList | _postRenderList
osg::ref_ptr< osg::Viewport > | _viewport
GLenum | _drawBuffer
GLenum | _readBuffer
GLbitfield | _clearMask
osg::ref_ptr< osg::ColorMask > | _colorMask
osg::Vec4 | _clearColor
osg::Vec4 | _clearAccum
double | _clearDepth
int | _clearStencil
bool | _cameraRequiresSetUp
osg::CameraNode * | _camera
osg::ref_ptr< osg::Texture > | _texture
unsigned int | _level
unsigned int | _face
osg::ref_ptr< osg::Image > | _image
GLenum | _imageReadPixelFormat
GLenum | _imageReadPixelDataType
osg::ref_ptr< osg::FrameBufferObject > | _fbo
osg::ref_ptr< osg::GraphicsContext > | _graphicsContext
osg::Matrix | _inheritedPositionalStateContainerMatrix
osg::ref_ptr< PositionalStateContainer > | _inheritedPositionalStateContainer
osg::ref_ptr< PositionalStateContainer > | _renderStageLighting

## Detailed Description

RenderStage 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::RenderStageList`[protected]`

## Constructor & Destructor Documentation

osgUtil::RenderStage::RenderStage | ( |  | ) |

osgUtil::RenderStage::RenderStage | ( | SortMode | mode | ) |

osgUtil::RenderStage::RenderStage | ( | const RenderStage & | rhs,
|  | const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY
| ) |

virtual osgUtil::RenderStage::~RenderStage | ( |  | ) | `[protected, virtual]`

## Member Function Documentation

virtual void osgUtil::RenderStage::addPositionedAttribute | ( | osg::RefMatrix * | matrix,
|  | const osg::StateAttribute * | attr
| ) | `[inline, virtual]`

virtual void osgUtil::RenderStage::addPositionedTextureAttribute | ( | unsigned int | textureUnit,
|  | osg::RefMatrix * | matrix,
|  | const osg::StateAttribute * | attr
| ) | `[inline, virtual]`

void osgUtil::RenderStage::addPostRenderStage | ( | RenderStage * | rs | ) |

void osgUtil::RenderStage::addPreRenderStage | ( | RenderStage * | rs | ) |

void osgUtil::RenderStage::addToDependencyList | ( | RenderStage * | rs | ) | `[inline]`

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.

virtual osg::Object* osgUtil::RenderStage::clone | ( | const osg::CopyOp & | copyop | ) | const`[inline, virtual]`

| Reimplemented from osgUtil::RenderBin.

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.

void osgUtil::RenderStage::copyTexture | ( | osg::State & | state | ) |

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

| Reimplemented from osgUtil::RenderBin.

virtual void osgUtil::RenderStage::drawImplementation | ( | osg::State & | state,
|  | RenderLeaf *& | previous
| ) | `[virtual]`

| Reimplemented from osgUtil::RenderBin.

virtual void osgUtil::RenderStage::drawInner | ( | osg::State & | state,
|  | RenderLeaf *& | previous,
|  | bool & | doCopyTexture
| ) | `[virtual]`

virtual void osgUtil::RenderStage::drawPostRenderStages | ( | osg::State & | state,
|  | RenderLeaf *& | previous
| ) | `[virtual]`

virtual void osgUtil::RenderStage::drawPreRenderStages | ( | osg::State & | state,
|  | RenderLeaf *& | previous
| ) | `[virtual]`

const osg::CameraNode* osgUtil::RenderStage::getCameraNode | ( |  | ) | const`[inline]`

osg::CameraNode* osgUtil::RenderStage::getCameraNode | ( |  | ) | `[inline]`

bool osgUtil::RenderStage::getCameraRequiresSetUp | ( |  | ) | const`[inline]`

const osg::Vec4& osgUtil::RenderStage::getClearAccum | ( |  | ) | const`[inline]`

| Get the clear accum.

const osg::Vec4& osgUtil::RenderStage::getClearColor | ( |  | ) | const`[inline]`

| Get the clear color.

double osgUtil::RenderStage::getClearDepth | ( |  | ) | const`[inline]`

| Get the clear depth.

GLbitfield osgUtil::RenderStage::getClearMask | ( |  | ) | const`[inline]`

| Get the clear mask.

int osgUtil::RenderStage::getClearStencil | ( |  | ) | const`[inline]`

| Get the clear color.

const osg::ColorMask* osgUtil::RenderStage::getColorMask | ( |  | ) | const`[inline]`

osg::ColorMask* osgUtil::RenderStage::getColorMask | ( |  | ) | `[inline]`

GLenum osgUtil::RenderStage::getDrawBuffer | ( |  | ) | const`[inline]`

| Get the draw buffer used at the start of each frame draw.

const osg::FrameBufferObject* osgUtil::RenderStage::getFrameBufferObject | ( |  | ) | const`[inline]`

osg::FrameBufferObject* osgUtil::RenderStage::getFrameBufferObject | ( |  | ) | `[inline]`

const osg::GraphicsContext* osgUtil::RenderStage::getGraphicsContext | ( |  | ) | const`[inline]`

osg::GraphicsContext* osgUtil::RenderStage::getGraphicsContext | ( |  | ) | `[inline]`

osg::Image* osgUtil::RenderStage::getImage | ( |  | ) | `[inline]`

GLenum osgUtil::RenderStage::getImageReadPixelDataType | ( |  | ) | const`[inline]`

GLenum osgUtil::RenderStage::getImageReadPixelFormat | ( |  | ) | const`[inline]`

PositionalStateContainer* osgUtil::RenderStage::getInheritedPositionalStateContainer | ( |  | ) | `[inline]`

const osg::Matrix& osgUtil::RenderStage::getInheritedPositionalStateContainerMatrix | ( |  | ) | const`[inline]`

PositionalStateContainer* osgUtil::RenderStage::getPositionalStateContainer | ( |  | ) | const`[inline]`

GLenum osgUtil::RenderStage::getReadBuffer | ( |  | ) | const`[inline]`

| Get the read buffer for any required copy operations to use.

bool osgUtil::RenderStage::getStats | ( | Statistics * | primStats | ) |

| Extract stats for current draw list. Reimplemented from osgUtil::RenderBin.

osg::Texture* osgUtil::RenderStage::getTexture | ( |  | ) | `[inline]`

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.

virtual void osgUtil::RenderStage::reset | ( |  | ) | `[virtual]`

| Reimplemented from osgUtil::RenderBin.

void osgUtil::RenderStage::runCameraSetUp | ( | osg::State & | state | ) |

| Attempt the set the RenderStage from the Camera settings.

void osgUtil::RenderStage::setCameraNode | ( | osg::CameraNode * | camera | ) | `[inline]`

void osgUtil::RenderStage::setCameraRequiresSetUp | ( | bool | flag | ) | `[inline]`

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 | ( | 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 | ( | GLbitfield | mask | ) | `[inline]`

| Set the clear mask used in glClear(..). Defaults to GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT.

void osgUtil::RenderStage::setClearStencil | ( | int | stencil | ) | `[inline]`

| Set the clear stencil value used in glClearStencil(). Defaults to 0; glClearStencil is only called if mask & GL_STENCIL_BUFFER_BIT is true

void osgUtil::RenderStage::setColorMask | ( | osg::ColorMask * | cm | ) | `[inline]`

void osgUtil::RenderStage::setDrawBuffer | ( | GLenum | buffer | ) | `[inline]`

| Set the draw buffer used at the start of each frame draw.

void osgUtil::RenderStage::setFrameBufferObject | ( | osg::FrameBufferObject * | fbo | ) | `[inline]`

void osgUtil::RenderStage::setGraphicsContext | ( | osg::GraphicsContext * | context | ) | `[inline]`

void osgUtil::RenderStage::setImage | ( | osg::Image * | image | ) | `[inline]`

void osgUtil::RenderStage::setImageReadPixelDataType | ( | GLenum | type | ) | `[inline]`

void osgUtil::RenderStage::setImageReadPixelFormat | ( | GLenum | format | ) | `[inline]`

void osgUtil::RenderStage::setInheritedPositionalStateContainer | ( | PositionalStateContainer * | rsl | ) | `[inline]`

void osgUtil::RenderStage::setInheritedPositionalStateContainerMatrix | ( | const osg::Matrix & | matrix | ) | `[inline]`

void osgUtil::RenderStage::setPositionalStateContainer | ( | PositionalStateContainer * | rsl | ) | `[inline]`

void osgUtil::RenderStage::setReadBuffer | ( | GLenum | buffer | ) | `[inline]`

| Set the read buffer for any required copy operations to use.

void osgUtil::RenderStage::setTexture | ( | osg::Texture * | texture,
|  | unsigned int | level = 0,
|  | unsigned int | face = 0
| ) | `[inline]`

void osgUtil::RenderStage::setViewport | ( | osg::Viewport * | viewport | ) | `[inline]`

| Set the viewport.

virtual void osgUtil::RenderStage::sort | ( |  | ) | `[virtual]`

| Reimplemented from osgUtil::RenderBin.

## Member Data Documentation

osg::CameraNode* osgUtil::RenderStage::_camera`[protected]`

bool osgUtil::RenderStage::_cameraRequiresSetUp`[protected]`

osg::Vec4 osgUtil::RenderStage::_clearAccum`[protected]`

osg::Vec4 osgUtil::RenderStage::_clearColor`[protected]`

double osgUtil::RenderStage::_clearDepth`[protected]`

GLbitfield osgUtil::RenderStage::_clearMask`[protected]`

int osgUtil::RenderStage::_clearStencil`[protected]`

osg::ref_ptr<osg::ColorMask> osgUtil::RenderStage::_colorMask`[protected]`

GLenum osgUtil::RenderStage::_drawBuffer`[protected]`

unsigned int osgUtil::RenderStage::_face`[protected]`

osg::ref_ptr<osg::FrameBufferObject> osgUtil::RenderStage::_fbo`[protected]`

osg::ref_ptr<osg::GraphicsContext> osgUtil::RenderStage::_graphicsContext`[protected]`

osg::ref_ptr<osg::Image> osgUtil::RenderStage::_image`[protected]`

GLenum osgUtil::RenderStage::_imageReadPixelDataType`[protected]`

GLenum osgUtil::RenderStage::_imageReadPixelFormat`[protected]`

osg::ref_ptr<PositionalStateContainer> osgUtil::RenderStage::_inheritedPositionalStateContainer`[mutable, protected]`

osg::Matrix osgUtil::RenderStage::_inheritedPositionalStateContainerMatrix`[mutable, protected]`

unsigned int osgUtil::RenderStage::_level`[protected]`

RenderStageList osgUtil::RenderStage::_postRenderList`[protected]`

RenderStageList osgUtil::RenderStage::_preRenderList`[protected]`

GLenum osgUtil::RenderStage::_readBuffer`[protected]`

osg::ref_ptr<PositionalStateContainer> osgUtil::RenderStage::_renderStageLighting`[mutable, protected]`

bool osgUtil::RenderStage::_stageDrawnThisFrame`[protected]`

osg::ref_ptr<osg::Texture> osgUtil::RenderStage::_texture`[protected]`

osg::ref_ptr<osg::Viewport> osgUtil::RenderStage::_viewport`[protected]`

The documentation for this class was generated from the following file:

- RenderStage