OpenSceneGraph 3.6.5
osgUtil::RenderStage Class Reference

RenderStage base class. More...

#include <RenderStage>

Inheritance diagram for osgUtil::RenderStage:

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
 Clone the type of an object, with Object* return type.
virtual osg::Objectclone (const osg::CopyOp &copyop) const
 Clone an object, with Object* return type.
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, bool applyMask=true)
 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.
bool getDrawBufferApplyMask () const
 Get the apply mask defining whether glDrawBuffer is called at each frame draw.
void setDrawBufferApplyMask (bool applyMask)
 Set the apply mask defining whether glDrawBuffer is called at each frame draw.
void setReadBuffer (GLenum buffer, bool applyMask=true)
 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.
bool getReadBufferApplyMask () const
 Get the apply mask defining whether glReadBuffer is called at each frame draw.
void setReadBufferApplyMask (bool applyMask)
 Set the apply mask defining whether glReadBuffer is called at each frame draw.
void setViewport (osg::Viewport *viewport)
 Set the viewport.
const osg::ViewportgetViewport () const
 Get the const viewport.
osg::ViewportgetViewport ()
 Get the viewport.
void setInitialViewMatrix (const osg::RefMatrix *matrix)
 Set the initial view matrix.
const osg::RefMatrixgetInitialViewMatrix ()
 Get the initial view matrix.
void setClearMask (GLbitfield mask)
 Set the clear mask used in glClear(..).
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 (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 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)
 Attempt the set the RenderStage from the Camera settings.
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)
 Set a framebuffer object to render into.
osg::FrameBufferObjectgetFrameBufferObject ()
const osg::FrameBufferObjectgetFrameBufferObject () const
void setMultisampleResolveFramebufferObject (osg::FrameBufferObject *fbo)
 Sets the destination framebuffer object for glBlitFramebufferEXT to resolve a multisampled framebuffer object after the RenderStage is drawn.
osg::FrameBufferObjectgetMultisampleResolveFramebufferObject ()
const osg::FrameBufferObjectgetMultisampleResolveFramebufferObject () const
void setDisableFboAfterRender (bool disable)
 Set whether the framebuffer object should be unbound after rendering.
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
 Extract stats for current draw list.
virtual unsigned int computeNumberOfDynamicRenderLeaves () const
 Compute the number of dynamic RenderLeaves.
void attach (osg::Camera::BufferComponent buffer, osg::Image *image)
void 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.
void clearReferencesToDependentCameras ()
 clear the references to any dependent cameras.
virtual void releaseGLObjects (osg::State *state=0) const
 If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context.
Public Member Functions inherited from osgUtil::RenderBin
 RenderBin ()
 RenderBin (SortMode mode)
 RenderBin (const RenderBin &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.
virtual const char * libraryName () const
 return the name of the object's library.
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
 Extract stats for current draw list.
void copyLeavesFromStateGraphListToRenderLeafList ()
Public Member Functions inherited from osg::Object
 Object ()
 Construct an object.
 Object (bool threadSafeRefUnref)
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor, optional CopyOp object can be used to control shallow vs deep copying of dynamic data.
std::string getCompoundClassName () const
 return the compound class name that combines the library name and class name.
virtual NodeasNode ()
 Convert 'this' into a Node pointer if Object is a Node, otherwise return 0.
virtual const NodeasNode () const
 convert 'const this' into a const Node pointer if Object is a Node, otherwise return 0.
virtual NodeVisitorasNodeVisitor ()
 Convert 'this' into a NodeVisitor pointer if Object is a NodeVisitor, otherwise return 0.
virtual const NodeVisitorasNodeVisitor () const
 convert 'const this' into a const NodeVisitor pointer if Object is a NodeVisitor, otherwise return 0.
virtual StateSetasStateSet ()
 Convert 'this' into a StateSet pointer if Object is a StateSet, otherwise return 0.
virtual const StateSetasStateSet () const
 convert 'const this' into a const StateSet pointer if Object is a StateSet, otherwise return 0.
virtual StateAttributeasStateAttribute ()
 Convert 'this' into a StateAttribute pointer if Object is a StateAttribute, otherwise return 0.
virtual const StateAttributeasStateAttribute () const
 convert 'const this' into a const StateAttribute pointer if Object is a StateAttribute, otherwise return 0.
virtual UniformasUniform ()
 Convert 'this' into a Uniform pointer if Object is a Uniform, otherwise return 0.
virtual const UniformasUniform () const
 convert 'const this' into a const Uniform pointer if Object is a Uniform, otherwise return 0.
virtual CameraasCamera ()
 Convert 'this' into a Camera pointer if Node is a Camera, otherwise return 0.
virtual const CameraasCamera () const
 convert 'const this' into a const Camera pointer if Node is a Camera, otherwise return 0.
virtual DrawableasDrawable ()
 Convert 'this' into a Drawable pointer if Object is a Drawable, otherwise return 0.
virtual const DrawableasDrawable () const
 convert 'const this' into a const Drawable pointer if Object is a Drawable, otherwise return 0.
virtual CallbackasCallback ()
 Convert 'this' into a Callback pointer if Object is a Callback, otherwise return 0.
virtual const CallbackasCallback () const
 convert 'const this' into a const Callback pointer if Object is a Callback, otherwise return 0.
virtual CallbackObjectasCallbackObject ()
 Convert 'this' into a CallbackObject pointer if Object is a CallbackObject, otherwise return 0.
virtual const CallbackObjectasCallbackObject () const
 convert 'const this' into a const CallbackObject pointer if Object is a CallbackObject, otherwise return 0.
virtual UserDataContainerasUserDataContainer ()
 Convert 'this' into a UserDataContainer pointer if Object is a UserDataContainer, otherwise return 0.
virtual const UserDataContainerasUserDataContainer () const
 convert 'const this' into a const UserDataContainer pointer if Object is a UserDataContainer, otherwise return 0.
virtual ValueObjectasValueObject ()
 Convert 'this' into a ValueObject pointer if Object is a ValueObject, otherwise return 0.
virtual const ValueObjectasValueObject () const
 Convert 'this' into a ValueObject pointer if Object is a ValueObject, otherwise return 0.
virtual ImageasImage ()
 Convert 'this' into a Image pointer if Object is a Image, otherwise return 0.
virtual const ImageasImage () const
 Convert 'this' into a Image pointer if Object is a Image, otherwise return 0.
virtual void setThreadSafeRefUnref (bool threadSafe)
 Set whether to use a mutex to ensure ref() and unref() are thread safe.
virtual void setName (const std::string &name)
 Set the name of object using C++ style string.
void setName (const char *name)
 Set the name of object using a C style string.
const std::string & getName () const
 Get the name of object.
void setDataVariance (DataVariance dv)
 Set the data variance of this object.
DataVariance getDataVariance () const
 Get the data variance of this object.
virtual void computeDataVariance ()
 Compute the DataVariance based on an assessment of callback etc.
void setUserDataContainer (osg::UserDataContainer *udc)
 set the UserDataContainer object.
template<class T>
void setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainergetUserDataContainer ()
 get the UserDataContainer attached to this object.
const osg::UserDataContainergetUserDataContainer () const
 get the const UserDataContainer attached to this object.
osg::UserDataContainergetOrCreateUserDataContainer ()
 Convenience method that returns the UserDataContainer, and if one doesn't already exist creates and assigns a DefaultUserDataContainer to the Object and then return this new UserDataContainer.
virtual void setUserData (Referenced *obj)
 Set user data, data must be subclassed from Referenced to allow automatic memory handling.
template<class T>
void setUserData (const ref_ptr< T > &ud)
virtual ReferencedgetUserData ()
 Get user data.
virtual const ReferencedgetUserData () const
 Get const user data.
template<typename T>
bool getUserValue (const std::string &name, T &value) const
 Convenience method that casts the named UserObject to osg::TemplateValueObject<T> and gets the value.
template<typename T>
void setUserValue (const std::string &name, const T &value)
 Convenience method that creates the osg::TemplateValueObject<T> to store the specified value and adds it as a named UserObject.
virtual void resizeGLObjectBuffers (unsigned int)
 Resize any per context GLObject buffers to specified size.
template<typename T>
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool getUserValue (const std::string &name, T &value) const
 provide implementation of osg::Object::getUserValue(..) template
Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Deprecated, Referenced is now always uses thread safe ref/unref, use default Referenced() constructor instead.
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
bool getThreadSafeRefUnref () const
 Get whether a mutex is used to ensure ref() and unref() are thread safe.
OpenThreads::Mutex * getRefMutex () const
 Get the mutex used to ensure thread safety of ref()/unref().
int ref () const
 Increment the reference count by one, indicating that this object has another pointer which is referencing it.
int unref () const
 Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it.
int unref_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it.
int referenceCount () const
 Return the number of pointers currently referencing this object.
ObserverSetgetObserverSet () const
 Get the ObserverSet if one is attached, otherwise return NULL.
ObserverSetgetOrCreateObserverSet () const
 Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet.
void addObserver (Observer *observer) const
 Add a Observer that is observing this object, notify the Observer when this object gets deleted.
void removeObserver (Observer *observer) const
 Remove Observer that is observing this object.

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 ()
 Object destructor.
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::Mutex * getGlobalReferencedMutex ()
 Get the optional global Referenced mutex, this can be shared between all osg::Referenced.
static void setDeleteHandler (DeleteHandler *handler)
 Set a DeleteHandler to which deletion of all referenced counted objects will be delegated.
static DeleteHandlergetDeleteHandler ()
 Get a DeleteHandler.

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 )

References RenderStage().

◆ addPreRenderStage()

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

References RenderStage().

Referenced by addToDependencyList().

◆ 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.

References RenderStage().

◆ 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.

References RenderStage().

◆ 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

References _camera.

◆ getCamera() [2/2]

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

References _camera.

◆ getCameraAttachmentMapCount()

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

◆ getCameraRequiresSetUp()

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

References _cameraRequiresSetUp.

◆ getClearAccum()

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

Get the clear accum.

References _clearAccum.

◆ getClearColor()

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

Get the clear color.

References _clearColor.

◆ getClearDepth()

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

Get the clear depth.

References _clearDepth.

◆ getClearMask()

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

Get the clear mask.

References _clearMask.

◆ getClearStencil()

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

Get the clear color.

References _clearStencil.

◆ getColorMask() [1/2]

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

References _colorMask.

◆ getColorMask() [2/2]

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

References _colorMask.

◆ 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.

References _drawBuffer.

◆ getDrawBufferApplyMask()

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

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

References _drawBufferApplyMask.

◆ getFrameBufferObject() [1/2]

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

References _fbo.

◆ getFrameBufferObject() [2/2]

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

References _fbo.

◆ getGraphicsContext() [1/2]

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

References _graphicsContext.

◆ getGraphicsContext() [2/2]

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

References _graphicsContext.

◆ getImage()

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

References _image.

◆ getImageReadPixelDataType()

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

◆ getImageReadPixelFormat()

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

References _imageReadPixelFormat.

◆ 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.

References _initialViewMatrix.

◆ getMultisampleResolveFramebufferObject() [1/2]

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

References _resolveFbo.

◆ getMultisampleResolveFramebufferObject() [2/2]

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

References _resolveFbo.

◆ getPositionalStateContainer()

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

◆ getPostRenderList() [1/2]

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

References _postRenderList.

◆ getPostRenderList() [2/2]

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

References _postRenderList.

◆ getPreRenderList() [1/2]

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

References _preRenderList.

◆ getPreRenderList() [2/2]

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

References _preRenderList.

◆ getReadBuffer()

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

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

References _readBuffer.

◆ getReadBufferApplyMask()

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

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

References _readBufferApplyMask.

◆ getStats()

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

Extract stats for current draw list.

◆ getTexture()

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

References _texture.

◆ getViewport() [1/2]

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

Get the viewport.

References _viewport.

◆ getViewport() [2/2]

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

Get the const viewport.

References _viewport.

◆ isSameKindAs()

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

Reimplemented from osgUtil::RenderBin.

References RenderStage().

◆ 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

References _camera, and _cameraRequiresSetUp.

◆ setCameraAttachmentMapCount()

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

◆ setCameraRequiresSetUp()

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

References _cameraRequiresSetUp.

◆ 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.

References _clearAccum.

◆ 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

References _clearColor.

◆ 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.

References _clearDepth.

◆ 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.

References _clearMask.

◆ 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

References _clearStencil.

◆ setColorMask()

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

References _colorMask.

◆ 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.

References _disableFboAfterRender.

◆ setDrawBuffer()

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

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

References _drawBuffer, and setDrawBufferApplyMask().

◆ setDrawBufferApplyMask()

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

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

References _drawBufferApplyMask.

Referenced by setDrawBuffer().

◆ 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().

References _fbo.

◆ setGraphicsContext()

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

References _graphicsContext.

◆ setImage()

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

References _image.

◆ setImageReadPixelDataType()

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

◆ setImageReadPixelFormat()

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

References _imageReadPixelFormat.

◆ 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.

References _initialViewMatrix.

◆ 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

References _renderStageLighting.

◆ setReadBuffer()

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

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

References _readBuffer, and setReadBufferApplyMask().

◆ setReadBufferApplyMask()

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

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

References _readBufferApplyMask.

Referenced by setReadBuffer().

◆ setTexture()

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

References _face, _level, and _texture.

◆ setViewport()

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

Set the viewport.

References _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

Referenced by getCamera(), getCamera(), and setCamera().

◆ _cameraAttachmentMapModifiedCount

unsigned int osgUtil::RenderStage::_cameraAttachmentMapModifiedCount
protected

◆ _cameraRequiresSetUp

bool osgUtil::RenderStage::_cameraRequiresSetUp
protected

◆ _clearAccum

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

Referenced by getClearAccum(), and setClearAccum().

◆ _clearColor

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

Referenced by getClearColor(), and setClearColor().

◆ _clearDepth

double osgUtil::RenderStage::_clearDepth
protected

Referenced by getClearDepth(), and setClearDepth().

◆ _clearMask

GLbitfield osgUtil::RenderStage::_clearMask
protected

Referenced by getClearMask(), and setClearMask().

◆ _clearStencil

int osgUtil::RenderStage::_clearStencil
protected

Referenced by getClearStencil(), and setClearStencil().

◆ _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

Referenced by getDrawBuffer(), and setDrawBuffer().

◆ _drawBufferApplyMask

bool osgUtil::RenderStage::_drawBufferApplyMask
protected

◆ _face

unsigned int osgUtil::RenderStage::_face
protected

Referenced by setTexture().

◆ _fbo

◆ _graphicsContext

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

◆ _image

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

Referenced by getImage(), and setImage().

◆ _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

Referenced by setTexture().

◆ _postRenderList

RenderStageList osgUtil::RenderStage::_postRenderList
protected

◆ _preRenderList

RenderStageList osgUtil::RenderStage::_preRenderList
protected

◆ _readBuffer

GLenum osgUtil::RenderStage::_readBuffer
protected

Referenced by getReadBuffer(), and setReadBuffer().

◆ _readBufferApplyMask

bool osgUtil::RenderStage::_readBufferApplyMask
protected

◆ _renderStageLighting

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

◆ _resolveFbo

◆ _stageDrawnThisFrame

bool osgUtil::RenderStage::_stageDrawnThisFrame
protected

◆ _texture

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

Referenced by getTexture(), and setTexture().

◆ _viewport

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

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

osg logo
Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.