openscenegraph
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osgUtil::RenderStage Class Reference

#include <RenderStage>

Inheritance diagram for osgUtil::RenderStage:
osgUtil::RenderBin osg::Object osg::Referenced

Classes

struct  Attachment
 

Public Types

typedef std::pair< int, osg::ref_ptr< RenderStage > > RenderStageOrderPair
 
typedef std::list< RenderStageOrderPairRenderStageList
 
- Public Types inherited from osgUtil::RenderBin
enum  SortMode {
  SORT_BY_STATE , SORT_BY_STATE_THEN_FRONT_TO_BACK , SORT_FRONT_TO_BACK , SORT_BACK_TO_FRONT ,
  TRAVERSAL_ORDER
}
 
typedef std::vector< RenderLeaf * > RenderLeafList
 
typedef std::vector< StateGraph * > StateGraphList
 
typedef std::map< int, osg::ref_ptr< RenderBin > > RenderBinList
 
- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC , STATIC , UNSPECIFIED }
 

Public Member Functions

 RenderStage ()
 
 RenderStage (SortMode mode)
 
 RenderStage (const RenderStage &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
virtual osg::ObjectcloneType () const
 
virtual osg::Objectclone (const osg::CopyOp &copyop) const
 
virtual bool isSameKindAs (const osg::Object *obj) const
 
virtual const char * className () const
 
virtual void reset ()
 
void setDrawBuffer (GLenum buffer, bool applyMask=true)
 
GLenum getDrawBuffer () const
 
bool getDrawBufferApplyMask () const
 
void setDrawBufferApplyMask (bool applyMask)
 
void setReadBuffer (GLenum buffer, bool applyMask=true)
 
GLenum getReadBuffer () const
 
bool getReadBufferApplyMask () const
 
void setReadBufferApplyMask (bool applyMask)
 
void setViewport (osg::Viewport *viewport)
 
const osg::ViewportgetViewport () const
 
osg::ViewportgetViewport ()
 
void setInitialViewMatrix (const osg::RefMatrix *matrix)
 
const osg::RefMatrixgetInitialViewMatrix ()
 
void setClearMask (GLbitfield mask)
 
GLbitfield getClearMask () const
 
void setColorMask (osg::ColorMask *cm)
 
osg::ColorMaskgetColorMask ()
 
const osg::ColorMaskgetColorMask () const
 
void setClearColor (const osg::Vec4 &color)
 
const osg::Vec4getClearColor () const
 
void setClearAccum (const osg::Vec4 &color)
 
const osg::Vec4getClearAccum () const
 
void setClearDepth (double depth)
 
double getClearDepth () const
 
void setClearStencil (int stencil)
 
int getClearStencil () const
 
void setCamera (osg::Camera *camera)
 
osg::CameragetCamera ()
 
const osg::CameragetCamera () const
 
void setCameraRequiresSetUp (bool flag)
 
bool getCameraRequiresSetUp () const
 
void setCameraAttachmentMapCount (unsigned int v)
 
unsigned int getCameraAttachmentMapCount ()
 
void runCameraSetUp (osg::RenderInfo &renderInfo)
 
void setTexture (osg::Texture *texture, unsigned int level=0, unsigned int face=0)
 
osg::TexturegetTexture ()
 
void setImage (osg::Image *image)
 
osg::ImagegetImage ()
 
void setImageReadPixelFormat (GLenum format)
 
GLenum getImageReadPixelFormat () const
 
void setImageReadPixelDataType (GLenum type)
 
GLenum getImageReadPixelDataType () const
 
void setFrameBufferObject (osg::FrameBufferObject *fbo)
 
osg::FrameBufferObjectgetFrameBufferObject ()
 
const osg::FrameBufferObjectgetFrameBufferObject () const
 
void setMultisampleResolveFramebufferObject (osg::FrameBufferObject *fbo)
 
osg::FrameBufferObjectgetMultisampleResolveFramebufferObject ()
 
const osg::FrameBufferObjectgetMultisampleResolveFramebufferObject () const
 
void setDisableFboAfterRender (bool disable)
 
bool getDisableFboAfterRender () const
 
void setGraphicsContext (osg::GraphicsContext *context)
 
osg::GraphicsContextgetGraphicsContext ()
 
const osg::GraphicsContextgetGraphicsContext () const
 
void setInheritedPositionalStateContainerMatrix (const osg::Matrix &matrix)
 
const osg::MatrixgetInheritedPositionalStateContainerMatrix () const
 
void setInheritedPositionalStateContainer (PositionalStateContainer *rsl)
 
PositionalStateContainergetInheritedPositionalStateContainer ()
 
void setPositionalStateContainer (PositionalStateContainer *rsl)
 
PositionalStateContainergetPositionalStateContainer () 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::RenderInfo &renderInfo)
 
virtual void sort ()
 
virtual void drawPreRenderStages (osg::RenderInfo &renderInfo, RenderLeaf *&previous)
 
virtual void draw (osg::RenderInfo &renderInfo, RenderLeaf *&previous)
 
virtual void drawInner (osg::RenderInfo &renderInfo, RenderLeaf *&previous, bool &doCopyTexture)
 
virtual void drawPostRenderStages (osg::RenderInfo &renderInfo, RenderLeaf *&previous)
 
virtual void drawImplementation (osg::RenderInfo &renderInfo, RenderLeaf *&previous)
 
void addToDependencyList (RenderStage *rs)
 
void addPreRenderStage (RenderStage *rs, int order=0)
 
void addPostRenderStage (RenderStage *rs, int order=0)
 
const RenderStageListgetPreRenderList () const
 
RenderStageListgetPreRenderList ()
 
const RenderStageListgetPostRenderList () const
 
RenderStageListgetPostRenderList ()
 
bool getStats (Statistics &stats) const
 
virtual unsigned int computeNumberOfDynamicRenderLeaves () const
 
void attach (osg::Camera::BufferComponent buffer, osg::Image *image)
 
void collateReferencesToDependentCameras ()
 
void clearReferencesToDependentCameras ()
 
virtual void releaseGLObjects (osg::State *state=0) const
 
- Public Member Functions inherited from osgUtil::RenderBin
 RenderBin ()
 
 RenderBin (SortMode mode)
 
 RenderBin (const RenderBin &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
virtual const char * libraryName () const
 
void setStateGraph (StateGraph *sg)
 
StateGraphgetStateGraph ()
 
void setStateSet (osg::StateSet *stateset)
 
osg::StateSetgetStateSet ()
 
const osg::StateSetgetStateSet () const
 
RenderBingetParent ()
 
const RenderBingetParent () const
 
RenderStagegetStage ()
 
const RenderStagegetStage () const
 
int getBinNum () const
 
StateGraphListgetStateGraphList ()
 
const StateGraphListgetStateGraphList () const
 
RenderBinListgetRenderBinList ()
 
const RenderBinListgetRenderBinList () const
 
RenderLeafListgetRenderLeafList ()
 
const RenderLeafListgetRenderLeafList () const
 
RenderBinfind_or_insert (int binNum, const std::string &binName)
 
void addStateGraph (StateGraph *rg)
 
virtual void sortImplementation ()
 
void setSortMode (SortMode mode)
 
SortMode getSortMode () const
 
virtual void sortByState ()
 
virtual void sortByStateThenFrontToBack ()
 
virtual void sortFrontToBack ()
 
virtual void sortBackToFront ()
 
virtual void sortTraversalOrder ()
 
void setSortCallback (SortCallback *sortCallback)
 
SortCallbackgetSortCallback ()
 
const SortCallbackgetSortCallback () const
 
void setDrawCallback (DrawCallback *drawCallback)
 
DrawCallbackgetDrawCallback ()
 
const DrawCallbackgetDrawCallback () const
 
bool getStats (Statistics &primStats) const
 
void copyLeavesFromStateGraphListToRenderLeafList ()
 
- Public Member Functions inherited from osg::Object
 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
std::string getCompoundClassName () const
 
virtual NodeasNode ()
 
virtual const NodeasNode () const
 
virtual NodeVisitorasNodeVisitor ()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual StateSetasStateSet ()
 
virtual const StateSetasStateSet () const
 
virtual StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () const
 
virtual CameraasCamera ()
 
virtual const CameraasCamera () const
 
virtual DrawableasDrawable ()
 
virtual const DrawableasDrawable () const
 
virtual CallbackasCallback ()
 
virtual const CallbackasCallback () const
 
virtual CallbackObjectasCallbackObject ()
 
virtual const CallbackObjectasCallbackObject () const
 
virtual UserDataContainerasUserDataContainer ()
 
virtual const UserDataContainerasUserDataContainer () const
 
virtual ValueObjectasValueObject ()
 
virtual const ValueObjectasValueObject () const
 
virtual ImageasImage ()
 
virtual const ImageasImage () const
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
virtual void setName (const std::string &name)
 
void setName (const char *name)
 
const std::string & getName () const
 
void setDataVariance (DataVariance dv)
 
DataVariance getDataVariance () const
 
virtual void computeDataVariance ()
 
void setUserDataContainer (osg::UserDataContainer *udc)
 
template<class T >
void setUserDataContainer (const ref_ptr< T > &udc)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
template<class T >
void setUserData (const ref_ptr< T > &ud)
 
virtual ReferencedgetUserData ()
 
virtual const ReferencedgetUserData () const
 
template<typename T >
bool getUserValue (const std::string &name, T &value) const
 
template<typename T >
void setUserValue (const std::string &name, const T &value)
 
virtual void resizeGLObjectBuffers (unsigned int)
 
template<typename T >
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool getUserValue (const std::string &name, T &value) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 

Protected Types

typedef std::vector< osg::ref_ptr< osg::Camera > > Cameras
 

Protected Member Functions

virtual ~RenderStage ()
 
- Protected Member Functions inherited from osgUtil::RenderBin
virtual ~RenderBin ()
 
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

bool _stageDrawnThisFrame
 
RenderStageList _preRenderList
 
RenderStageList _postRenderList
 
Cameras _dependentCameras
 
osg::ref_ptr< osg::Viewport_viewport
 
osg::ref_ptr< const osg::RefMatrix_initialViewMatrix
 
GLenum _drawBuffer
 
bool _drawBufferApplyMask
 
GLenum _readBuffer
 
bool _readBufferApplyMask
 
GLbitfield _clearMask
 
osg::ref_ptr< osg::ColorMask_colorMask
 
osg::Vec4 _clearColor
 
osg::Vec4 _clearAccum
 
double _clearDepth
 
int _clearStencil
 
bool _cameraRequiresSetUp
 
unsigned int _cameraAttachmentMapModifiedCount
 
osg::observer_ptr< osg::Camera_camera
 
osg::ref_ptr< osg::Texture_texture
 
unsigned int _level
 
unsigned int _face
 
osg::ref_ptr< osg::Image_image
 
GLenum _imageReadPixelFormat
 
GLenum _imageReadPixelDataType
 
std::map< osg::Camera::BufferComponent, Attachment_bufferAttachmentMap
 
osg::ref_ptr< osg::FrameBufferObject_fbo
 
osg::ref_ptr< osg::FrameBufferObject_resolveFbo
 
osg::ref_ptr< osg::GraphicsContext_graphicsContext
 
bool _disableFboAfterRender
 
osg::Matrix _inheritedPositionalStateContainerMatrix
 
osg::ref_ptr< PositionalStateContainer_inheritedPositionalStateContainer
 
osg::ref_ptr< PositionalStateContainer_renderStageLighting
 
- Protected Attributes inherited from osgUtil::RenderBin
osg::ref_ptr< StateGraph_rootStateGraph
 
int _binNum
 
RenderBin_parent
 
RenderStage_stage
 
RenderBinList _bins
 
StateGraphList _stateGraphList
 
RenderLeafList _renderLeafList
 
bool _sorted
 
SortMode _sortMode
 
osg::ref_ptr< SortCallback_sortCallback
 
osg::ref_ptr< DrawCallback_drawCallback
 
osg::ref_ptr< osg::StateSet_stateset
 
- Protected Attributes inherited from osg::Object
std::string _name
 
DataVariance _dataVariance
 
osg::UserDataContainer_userDataContainer
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from osgUtil::RenderBin
static RenderBincreateRenderBin (const std::string &binName)
 
static RenderBingetRenderBinPrototype (const std::string &binName)
 
static void addRenderBinPrototype (const std::string &binName, RenderBin *proto)
 
static void removeRenderBinPrototype (RenderBin *proto)
 
static void setDefaultRenderBinSortMode (SortMode mode)
 
static SortMode getDefaultRenderBinSortMode ()
 
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

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

◆ Cameras

typedef std::vector< osg::ref_ptr<osg::Camera> > osgUtil::RenderStage::Cameras
protected

◆ RenderStageList

◆ RenderStageOrderPair

Constructor & Destructor Documentation

◆ RenderStage() [1/3]

osgUtil::RenderStage::RenderStage ( )

◆ RenderStage() [2/3]

osgUtil::RenderStage::RenderStage ( SortMode  mode)

◆ RenderStage() [3/3]

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

◆ ~RenderStage()

virtual osgUtil::RenderStage::~RenderStage ( )
protectedvirtual

Member Function Documentation

◆ addPositionedAttribute()

virtual void osgUtil::RenderStage::addPositionedAttribute ( osg::RefMatrix matrix,
const osg::StateAttribute attr 
)
inlinevirtual

◆ addPositionedTextureAttribute()

virtual void osgUtil::RenderStage::addPositionedTextureAttribute ( unsigned int  textureUnit,
osg::RefMatrix matrix,
const osg::StateAttribute attr 
)
inlinevirtual

◆ addPostRenderStage()

void osgUtil::RenderStage::addPostRenderStage ( RenderStage rs,
int  order = 0 
)

◆ addPreRenderStage()

void osgUtil::RenderStage::addPreRenderStage ( RenderStage rs,
int  order = 0 
)

◆ addToDependencyList()

void osgUtil::RenderStage::addToDependencyList ( RenderStage rs)
inline

◆ attach()

void osgUtil::RenderStage::attach ( osg::Camera::BufferComponent  buffer,
osg::Image image 
)

◆ className()

virtual const char * osgUtil::RenderStage::className ( ) const
inlinevirtual

return the name of the object's class type. Must be defined by derived classes.

Reimplemented from osgUtil::RenderBin.

◆ clearReferencesToDependentCameras()

void osgUtil::RenderStage::clearReferencesToDependentCameras ( )

clear the references to any dependent cameras.

◆ clone()

virtual osg::Object * osgUtil::RenderStage::clone ( const osg::CopyOp ) const
inlinevirtual

Clone an object, with Object* return type. Must be defined by derived classes.

Reimplemented from osgUtil::RenderBin.

◆ cloneType()

virtual osg::Object * osgUtil::RenderStage::cloneType ( ) const
inlinevirtual

Clone the type of an object, with Object* return type. Must be defined by derived classes.

Reimplemented from osgUtil::RenderBin.

◆ collateReferencesToDependentCameras()

void osgUtil::RenderStage::collateReferencesToDependentCameras ( )

search through any pre and post RenderStage that reference a Camera, and take a reference to each of these cameras to prevent them being deleted while they are still be used by the drawing thread.

◆ computeNumberOfDynamicRenderLeaves()

virtual unsigned int osgUtil::RenderStage::computeNumberOfDynamicRenderLeaves ( ) const
virtual

Compute the number of dynamic RenderLeaves.

Reimplemented from osgUtil::RenderBin.

◆ copyTexture()

void osgUtil::RenderStage::copyTexture ( osg::RenderInfo renderInfo)

◆ draw()

virtual void osgUtil::RenderStage::draw ( osg::RenderInfo renderInfo,
RenderLeaf *&  previous 
)
virtual

Reimplemented from osgUtil::RenderBin.

◆ drawImplementation()

virtual void osgUtil::RenderStage::drawImplementation ( osg::RenderInfo renderInfo,
RenderLeaf *&  previous 
)
virtual

Reimplemented from osgUtil::RenderBin.

◆ drawInner()

virtual void osgUtil::RenderStage::drawInner ( osg::RenderInfo renderInfo,
RenderLeaf *&  previous,
bool &  doCopyTexture 
)
virtual

◆ drawPostRenderStages()

virtual void osgUtil::RenderStage::drawPostRenderStages ( osg::RenderInfo renderInfo,
RenderLeaf *&  previous 
)
virtual

◆ drawPreRenderStages()

virtual void osgUtil::RenderStage::drawPreRenderStages ( osg::RenderInfo renderInfo,
RenderLeaf *&  previous 
)
virtual

◆ getCamera() [1/2]

osg::Camera * osgUtil::RenderStage::getCamera ( )
inline

◆ getCamera() [2/2]

const osg::Camera * osgUtil::RenderStage::getCamera ( ) const
inline

◆ getCameraAttachmentMapCount()

unsigned int osgUtil::RenderStage::getCameraAttachmentMapCount ( )
inline

◆ getCameraRequiresSetUp()

bool osgUtil::RenderStage::getCameraRequiresSetUp ( ) const
inline

◆ getClearAccum()

const osg::Vec4 & osgUtil::RenderStage::getClearAccum ( ) const
inline

Get the clear accum.

◆ getClearColor()

const osg::Vec4 & osgUtil::RenderStage::getClearColor ( ) const
inline

Get the clear color.

◆ getClearDepth()

double osgUtil::RenderStage::getClearDepth ( ) const
inline

Get the clear depth.

◆ getClearMask()

GLbitfield osgUtil::RenderStage::getClearMask ( ) const
inline

Get the clear mask.

◆ getClearStencil()

int osgUtil::RenderStage::getClearStencil ( ) const
inline

Get the clear color.

◆ getColorMask() [1/2]

osg::ColorMask * osgUtil::RenderStage::getColorMask ( )
inline

◆ getColorMask() [2/2]

const osg::ColorMask * osgUtil::RenderStage::getColorMask ( ) const
inline

◆ getDisableFboAfterRender()

bool osgUtil::RenderStage::getDisableFboAfterRender ( ) const
inline

◆ getDrawBuffer()

GLenum osgUtil::RenderStage::getDrawBuffer ( ) const
inline

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

◆ getDrawBufferApplyMask()

bool osgUtil::RenderStage::getDrawBufferApplyMask ( ) const
inline

Get the apply mask defining whether glDrawBuffer is called at each frame draw.

◆ getFrameBufferObject() [1/2]

osg::FrameBufferObject * osgUtil::RenderStage::getFrameBufferObject ( )
inline

◆ getFrameBufferObject() [2/2]

const osg::FrameBufferObject * osgUtil::RenderStage::getFrameBufferObject ( ) const
inline

◆ getGraphicsContext() [1/2]

osg::GraphicsContext * osgUtil::RenderStage::getGraphicsContext ( )
inline

◆ getGraphicsContext() [2/2]

const osg::GraphicsContext * osgUtil::RenderStage::getGraphicsContext ( ) const
inline

◆ getImage()

osg::Image * osgUtil::RenderStage::getImage ( )
inline

◆ getImageReadPixelDataType()

GLenum osgUtil::RenderStage::getImageReadPixelDataType ( ) const
inline

◆ getImageReadPixelFormat()

GLenum osgUtil::RenderStage::getImageReadPixelFormat ( ) const
inline

◆ getInheritedPositionalStateContainer()

PositionalStateContainer * osgUtil::RenderStage::getInheritedPositionalStateContainer ( )
inline

◆ getInheritedPositionalStateContainerMatrix()

const osg::Matrix & osgUtil::RenderStage::getInheritedPositionalStateContainerMatrix ( ) const
inline

◆ getInitialViewMatrix()

const osg::RefMatrix * osgUtil::RenderStage::getInitialViewMatrix ( )
inline

Get the initial view matrix.

◆ getMultisampleResolveFramebufferObject() [1/2]

osg::FrameBufferObject * osgUtil::RenderStage::getMultisampleResolveFramebufferObject ( )
inline

◆ getMultisampleResolveFramebufferObject() [2/2]

const osg::FrameBufferObject * osgUtil::RenderStage::getMultisampleResolveFramebufferObject ( ) const
inline

◆ getPositionalStateContainer()

PositionalStateContainer * osgUtil::RenderStage::getPositionalStateContainer ( ) const
inline

◆ getPostRenderList() [1/2]

RenderStageList & osgUtil::RenderStage::getPostRenderList ( )
inline

◆ getPostRenderList() [2/2]

const RenderStageList & osgUtil::RenderStage::getPostRenderList ( ) const
inline

◆ getPreRenderList() [1/2]

RenderStageList & osgUtil::RenderStage::getPreRenderList ( )
inline

◆ getPreRenderList() [2/2]

const RenderStageList & osgUtil::RenderStage::getPreRenderList ( ) const
inline

◆ getReadBuffer()

GLenum osgUtil::RenderStage::getReadBuffer ( ) const
inline

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

◆ getReadBufferApplyMask()

bool osgUtil::RenderStage::getReadBufferApplyMask ( ) const
inline

Get the apply mask defining whether glReadBuffer is called at each frame draw.

◆ getStats()

bool osgUtil::RenderStage::getStats ( Statistics stats) const

Extract stats for current draw list.

◆ getTexture()

osg::Texture * osgUtil::RenderStage::getTexture ( )
inline

◆ getViewport() [1/2]

osg::Viewport * osgUtil::RenderStage::getViewport ( )
inline

Get the viewport.

◆ getViewport() [2/2]

const osg::Viewport * osgUtil::RenderStage::getViewport ( ) const
inline

Get the const viewport.

◆ isSameKindAs()

virtual bool osgUtil::RenderStage::isSameKindAs ( const osg::Object obj) const
inlinevirtual

Reimplemented from osgUtil::RenderBin.

◆ releaseGLObjects()

virtual void osgUtil::RenderStage::releaseGLObjects ( osg::State state = 0) const
virtual

If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. Otherwise, releases OpenGL objexts for all graphics contexts.

Reimplemented from osgUtil::RenderBin.

◆ reset()

virtual void osgUtil::RenderStage::reset ( )
virtual

Reimplemented from osgUtil::RenderBin.

◆ runCameraSetUp()

void osgUtil::RenderStage::runCameraSetUp ( osg::RenderInfo renderInfo)

Attempt the set the RenderStage from the Camera settings.

◆ setCamera()

void osgUtil::RenderStage::setCamera ( osg::Camera camera)
inline

◆ setCameraAttachmentMapCount()

void osgUtil::RenderStage::setCameraAttachmentMapCount ( unsigned int  v)
inline

◆ setCameraRequiresSetUp()

void osgUtil::RenderStage::setCameraRequiresSetUp ( bool  flag)
inline

◆ setClearAccum()

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.

◆ setClearColor()

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

◆ setClearDepth()

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.

◆ setClearMask()

void osgUtil::RenderStage::setClearMask ( GLbitfield  mask)
inline

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

◆ setClearStencil()

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

◆ setColorMask()

void osgUtil::RenderStage::setColorMask ( osg::ColorMask cm)
inline

◆ setDisableFboAfterRender()

void osgUtil::RenderStage::setDisableFboAfterRender ( bool  disable)
inline

Set whether the framebuffer object should be unbound after rendering. By default this is set to true. Set it to false if the unbinding is not required.

◆ setDrawBuffer()

void osgUtil::RenderStage::setDrawBuffer ( GLenum  buffer,
bool  applyMask = true 
)
inline

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

◆ setDrawBufferApplyMask()

void osgUtil::RenderStage::setDrawBufferApplyMask ( bool  applyMask)
inline

Set the apply mask defining whether glDrawBuffer is called at each frame draw.

◆ setFrameBufferObject()

void osgUtil::RenderStage::setFrameBufferObject ( osg::FrameBufferObject fbo)
inline

Set a framebuffer object to render into. It is permissible for the framebuffer object to be multisampled, in which case you should also set a resolve framebuffer object - see setMultisampleResolveFramebufferObject().

◆ setGraphicsContext()

void osgUtil::RenderStage::setGraphicsContext ( osg::GraphicsContext context)
inline

◆ setImage()

void osgUtil::RenderStage::setImage ( osg::Image image)
inline

◆ setImageReadPixelDataType()

void osgUtil::RenderStage::setImageReadPixelDataType ( GLenum  type)
inline

◆ setImageReadPixelFormat()

void osgUtil::RenderStage::setImageReadPixelFormat ( GLenum  format)
inline

◆ setInheritedPositionalStateContainer()

void osgUtil::RenderStage::setInheritedPositionalStateContainer ( PositionalStateContainer rsl)
inline

◆ setInheritedPositionalStateContainerMatrix()

void osgUtil::RenderStage::setInheritedPositionalStateContainerMatrix ( const osg::Matrix matrix)
inline

◆ setInitialViewMatrix()

void osgUtil::RenderStage::setInitialViewMatrix ( const osg::RefMatrix matrix)
inline

Set the initial view matrix.

◆ setMultisampleResolveFramebufferObject()

void osgUtil::RenderStage::setMultisampleResolveFramebufferObject ( osg::FrameBufferObject fbo)

Sets the destination framebuffer object for glBlitFramebufferEXT to resolve a multisampled framebuffer object after the RenderStage is drawn. The resolve framebuffer object must not be multisampled. The resolve framebuffer object is only necessary if the primary framebuffer object is multisampled, if not then leave it set to null.

◆ setPositionalStateContainer()

void osgUtil::RenderStage::setPositionalStateContainer ( PositionalStateContainer rsl)
inline

◆ setReadBuffer()

void osgUtil::RenderStage::setReadBuffer ( GLenum  buffer,
bool  applyMask = true 
)
inline

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

◆ setReadBufferApplyMask()

void osgUtil::RenderStage::setReadBufferApplyMask ( bool  applyMask)
inline

Set the apply mask defining whether glReadBuffer is called at each frame draw.

◆ setTexture()

void osgUtil::RenderStage::setTexture ( osg::Texture texture,
unsigned int  level = 0,
unsigned int  face = 0 
)
inline

◆ setViewport()

void osgUtil::RenderStage::setViewport ( osg::Viewport viewport)
inline

Set the viewport.

◆ sort()

virtual void osgUtil::RenderStage::sort ( )
virtual

Reimplemented from osgUtil::RenderBin.

Member Data Documentation

◆ _bufferAttachmentMap

std::map< osg::Camera::BufferComponent, Attachment> osgUtil::RenderStage::_bufferAttachmentMap
protected

◆ _camera

osg::observer_ptr<osg::Camera> osgUtil::RenderStage::_camera
protected

◆ _cameraAttachmentMapModifiedCount

unsigned int osgUtil::RenderStage::_cameraAttachmentMapModifiedCount
protected

◆ _cameraRequiresSetUp

bool osgUtil::RenderStage::_cameraRequiresSetUp
protected

◆ _clearAccum

osg::Vec4 osgUtil::RenderStage::_clearAccum
protected

◆ _clearColor

osg::Vec4 osgUtil::RenderStage::_clearColor
protected

◆ _clearDepth

double osgUtil::RenderStage::_clearDepth
protected

◆ _clearMask

GLbitfield osgUtil::RenderStage::_clearMask
protected

◆ _clearStencil

int osgUtil::RenderStage::_clearStencil
protected

◆ _colorMask

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

◆ _dependentCameras

Cameras osgUtil::RenderStage::_dependentCameras
protected

◆ _disableFboAfterRender

bool osgUtil::RenderStage::_disableFboAfterRender
protected

◆ _drawBuffer

GLenum osgUtil::RenderStage::_drawBuffer
protected

◆ _drawBufferApplyMask

bool osgUtil::RenderStage::_drawBufferApplyMask
protected

◆ _face

unsigned int osgUtil::RenderStage::_face
protected

◆ _fbo

osg::ref_ptr<osg::FrameBufferObject> osgUtil::RenderStage::_fbo
protected

◆ _graphicsContext

osg::ref_ptr<osg::GraphicsContext> osgUtil::RenderStage::_graphicsContext
protected

◆ _image

osg::ref_ptr<osg::Image> osgUtil::RenderStage::_image
protected

◆ _imageReadPixelDataType

GLenum osgUtil::RenderStage::_imageReadPixelDataType
protected

◆ _imageReadPixelFormat

GLenum osgUtil::RenderStage::_imageReadPixelFormat
protected

◆ _inheritedPositionalStateContainer

osg::ref_ptr<PositionalStateContainer> osgUtil::RenderStage::_inheritedPositionalStateContainer
mutableprotected

◆ _inheritedPositionalStateContainerMatrix

osg::Matrix osgUtil::RenderStage::_inheritedPositionalStateContainerMatrix
mutableprotected

◆ _initialViewMatrix

osg::ref_ptr<const osg::RefMatrix> osgUtil::RenderStage::_initialViewMatrix
protected

◆ _level

unsigned int osgUtil::RenderStage::_level
protected

◆ _postRenderList

RenderStageList osgUtil::RenderStage::_postRenderList
protected

◆ _preRenderList

RenderStageList osgUtil::RenderStage::_preRenderList
protected

◆ _readBuffer

GLenum osgUtil::RenderStage::_readBuffer
protected

◆ _readBufferApplyMask

bool osgUtil::RenderStage::_readBufferApplyMask
protected

◆ _renderStageLighting

osg::ref_ptr<PositionalStateContainer> osgUtil::RenderStage::_renderStageLighting
mutableprotected

◆ _resolveFbo

osg::ref_ptr<osg::FrameBufferObject> osgUtil::RenderStage::_resolveFbo
protected

◆ _stageDrawnThisFrame

bool osgUtil::RenderStage::_stageDrawnThisFrame
protected

◆ _texture

osg::ref_ptr<osg::Texture> osgUtil::RenderStage::_texture
protected

◆ _viewport

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

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