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

RenderStage base class. More...

Inheritance diagram for osgUtil::RenderStage:
Inheritance graph
[legend]

Classes

struct  Attachment
 

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. More...
 
virtual osg::Objectclone (const osg::CopyOp &copyop) const
 Clone an object, with Object* return type. More...
 
virtual bool isSameKindAs (const osg::Object *obj) const
 
virtual const char * className () const
 return the name of the object's class type. More...
 
virtual void reset ()
 
void setDrawBuffer (GLenum buffer, bool applyMask=true)
 Set the draw buffer used at the start of each frame draw. More...
 
GLenum getDrawBuffer () const
 Get the draw buffer used at the start of each frame draw. More...
 
bool getDrawBufferApplyMask () const
 Get the apply mask defining whether glDrawBuffer is called at each frame draw. More...
 
void setDrawBufferApplyMask (bool applyMask)
 Set the apply mask defining whether glDrawBuffer is called at each frame draw. More...
 
void setReadBuffer (GLenum buffer, bool applyMask=true)
 Set the read buffer for any required copy operations to use. More...
 
GLenum getReadBuffer () const
 Get the read buffer for any required copy operations to use. More...
 
bool getReadBufferApplyMask () const
 Get the apply mask defining whether glReadBuffer is called at each frame draw. More...
 
void setReadBufferApplyMask (bool applyMask)
 Set the apply mask defining whether glReadBuffer is called at each frame draw. More...
 
void setViewport (osg::Viewport *viewport)
 Set the viewport. More...
 
const osg::ViewportgetViewport () const
 Get the const viewport. More...
 
osg::ViewportgetViewport ()
 Get the viewport. More...
 
void setInitialViewMatrix (const osg::RefMatrix *matrix)
 Set the initial view matrix. More...
 
const osg::RefMatrixgetInitialViewMatrix ()
 Get the initial view matrix. More...
 
void setClearMask (GLbitfield mask)
 Set the clear mask used in glClear(..). More...
 
GLbitfield getClearMask () const
 Get the clear mask. More...
 
void setColorMask (osg::ColorMask *cm)
 
osg::ColorMaskgetColorMask ()
 
const osg::ColorMaskgetColorMask () const
 
void setClearColor (const osg::Vec4 &color)
 Set the clear color used in glClearColor(..). More...
 
const osg::Vec4getClearColor () const
 Get the clear color. More...
 
void setClearAccum (const osg::Vec4 &color)
 Set the clear accum used in glClearAccum(..). More...
 
const osg::Vec4getClearAccum () const
 Get the clear accum. More...
 
void setClearDepth (double depth)
 Set the clear depth used in glClearDepth(..). More...
 
double getClearDepth () const
 Get the clear depth. More...
 
void setClearStencil (int stencil)
 Set the clear stencil value used in glClearStencil(). More...
 
int getClearStencil () const
 Get the clear color. More...
 
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. More...
 
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. More...
 
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. More...
 
osg::FrameBufferObjectgetMultisampleResolveFramebufferObject ()
 
const osg::FrameBufferObjectgetMultisampleResolveFramebufferObject () const
 
void setDisableFboAfterRender (bool disable)
 Set whether the framebuffer object should be unbound after rendering. More...
 
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)
 
bool getStats (Statistics &stats) const
 Extract stats for current draw list. More...
 
virtual unsigned int computeNumberOfDynamicRenderLeaves () const
 Compute the number of dynamic RenderLeaves. More...
 
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. More...
 
void clearReferencesToDependentCameras ()
 clear the references to any dependent cameras. More...
 
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. More...
 
- 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. More...
 
virtual const char * libraryName () const
 return the name of the object's library. More...
 
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. More...
 
void copyLeavesFromStateGraphListToRenderLeafList ()
 
- Public Member Functions inherited from osg::Object
 Object ()
 Construct an object. More...
 
 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. More...
 
std::string getCompoundClassName () const
 return the compound class name that combines the library name and class name. More...
 
virtual NodeasNode ()
 Convert 'this' into a Node pointer if Object is a Node, otherwise return 0. More...
 
virtual const NodeasNode () const
 convert 'const this' into a const Node pointer if Object is a Node, otherwise return 0. More...
 
virtual NodeVisitorasNodeVisitor ()
 Convert 'this' into a NodeVisitor pointer if Object is a NodeVisitor, otherwise return 0. More...
 
virtual const NodeVisitorasNodeVisitor () const
 convert 'const this' into a const NodeVisitor pointer if Object is a NodeVisitor, otherwise return 0. More...
 
virtual StateAttributeasStateAttribute ()
 Convert 'this' into a StateAttribute pointer if Object is a StateAttribute, otherwise return 0. More...
 
virtual const StateAttributeasStateAttribute () const
 convert 'const this' into a const StateAttribute pointer if Object is a StateAttribute, otherwise return 0. More...
 
virtual UniformasUniform ()
 Convert 'this' into a Uniform pointer if Object is a Uniform, otherwise return 0. More...
 
virtual const UniformasUniform () const
 convert 'const this' into a const Uniform pointer if Object is a Uniform, otherwise return 0. More...
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 Set whether to use a mutex to ensure ref() and unref() are thread safe. More...
 
virtual void setName (const std::string &name)
 Set the name of object using C++ style string. More...
 
void setName (const char *name)
 Set the name of object using a C style string. More...
 
const std::string & getName () const
 Get the name of object. More...
 
void setDataVariance (DataVariance dv)
 Set the data variance of this object. More...
 
DataVariance getDataVariance () const
 Get the data variance of this object. More...
 
virtual void computeDataVariance ()
 Compute the DataVariance based on an assessment of callback etc. More...
 
void setUserDataContainer (osg::UserDataContainer *udc)
 set the UserDataContainer object. More...
 
template<class T >
void setUserDataContainer (const ref_ptr< T > &udc)
 
osg::UserDataContainergetUserDataContainer ()
 get the UserDataContainer attached to this object. More...
 
const osg::UserDataContainergetUserDataContainer () const
 get the const UserDataContainer attached to this object. More...
 
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. More...
 
virtual void setUserData (Referenced *obj)
 Set user data, data must be subclassed from Referenced to allow automatic memory handling. More...
 
template<class T >
void setUserData (const ref_ptr< T > &ud)
 
virtual ReferencedgetUserData ()
 Get user data. More...
 
virtual const ReferencedgetUserData () const
 Get const user data. More...
 
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. More...
 
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. More...
 
virtual void resizeGLObjectBuffers (unsigned int)
 Resize any per context GLObject buffers to specified size. More...
 
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 More...
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 Get whether a mutex is used to ensure ref() and unref() are thread safe. More...
 
OpenThreads::Mutex * getRefMutex () const
 Get the mutex used to ensure thread safety of ref()/unref(). More...
 
int ref () const
 Increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
int unref () const
 Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More...
 
int unref_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More...
 
int referenceCount () const
 Return the number of pointers currently referencing this object. More...
 
ObserverSetgetObserverSet () const
 Get the ObserverSet if one is attached, otherwise return NULL. More...
 
ObserverSetgetOrCreateObserverSet () const
 Get the ObserverSet if one is attached, otherwise create an ObserverSet, attach it, then return this newly created ObserverSet. More...
 
void addObserver (Observer *observer) const
 Add a Observer that is observing this object, notify the Observer when this object gets deleted. More...
 
void removeObserver (Observer *observer) const
 Remove Observer that is observing this object. More...
 

Protected Types

typedef std::pair< int, osg::ref_ptr< RenderStage > > RenderStageOrderPair
 
typedef std::list< RenderStageOrderPairRenderStageList
 
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. More...
 
- 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
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

- 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 }
 
- 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. More...
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 Set whether reference counting should use a mutex for thread safe reference counting. More...
 
static bool getThreadSafeReferenceCounting ()
 Get whether reference counting is active. More...
 
static void setDeleteHandler (DeleteHandler *handler)
 Set a DeleteHandler to which deletion of all referenced counted objects will be delegated. More...
 
static DeleteHandlergetDeleteHandler ()
 Get a DeleteHandler. More...
 

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<osg::Camera> > osgUtil::RenderStage::Cameras
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 ( )
protectedvirtual

Member Function Documentation

virtual void osgUtil::RenderStage::addPositionedAttribute ( osg::RefMatrix matrix,
const osg::StateAttribute attr 
)
inlinevirtual
virtual void osgUtil::RenderStage::addPositionedTextureAttribute ( unsigned int  textureUnit,
osg::RefMatrix matrix,
const osg::StateAttribute attr 
)
inlinevirtual
void osgUtil::RenderStage::addPostRenderStage ( RenderStage rs,
int  order = 0 
)
void osgUtil::RenderStage::addPreRenderStage ( RenderStage rs,
int  order = 0 
)
void osgUtil::RenderStage::addToDependencyList ( RenderStage rs)
inline
void osgUtil::RenderStage::attach ( osg::Camera::BufferComponent  buffer,
osg::Image image 
)
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.

void osgUtil::RenderStage::clearReferencesToDependentCameras ( )

clear the references to any dependent cameras.

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.

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.

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.

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

Compute the number of dynamic RenderLeaves.

Reimplemented from osgUtil::RenderBin.

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

Reimplemented from osgUtil::RenderBin.

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

Reimplemented from osgUtil::RenderBin.

virtual void osgUtil::RenderStage::drawInner ( osg::RenderInfo renderInfo,
RenderLeaf *&  previous,
bool &  doCopyTexture 
)
virtual
virtual void osgUtil::RenderStage::drawPostRenderStages ( osg::RenderInfo renderInfo,
RenderLeaf *&  previous 
)
virtual
virtual void osgUtil::RenderStage::drawPreRenderStages ( osg::RenderInfo renderInfo,
RenderLeaf *&  previous 
)
virtual
osg::Camera* osgUtil::RenderStage::getCamera ( )
inline
const osg::Camera* osgUtil::RenderStage::getCamera ( ) const
inline
unsigned int osgUtil::RenderStage::getCameraAttachmentMapCount ( )
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.

osg::ColorMask* osgUtil::RenderStage::getColorMask ( )
inline
const osg::ColorMask* osgUtil::RenderStage::getColorMask ( ) const
inline
bool osgUtil::RenderStage::getDisableFboAfterRender ( ) const
inline
GLenum osgUtil::RenderStage::getDrawBuffer ( ) const
inline

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

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

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

osg::FrameBufferObject* osgUtil::RenderStage::getFrameBufferObject ( )
inline
const osg::FrameBufferObject* osgUtil::RenderStage::getFrameBufferObject ( ) const
inline
osg::GraphicsContext* osgUtil::RenderStage::getGraphicsContext ( )
inline
const osg::GraphicsContext* osgUtil::RenderStage::getGraphicsContext ( ) const
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
const osg::RefMatrix* osgUtil::RenderStage::getInitialViewMatrix ( )
inline

Get the initial view matrix.

osg::FrameBufferObject* osgUtil::RenderStage::getMultisampleResolveFramebufferObject ( )
inline
const osg::FrameBufferObject* osgUtil::RenderStage::getMultisampleResolveFramebufferObject ( ) 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::getReadBufferApplyMask ( ) const
inline

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

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

Extract stats for current draw list.

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

Get the const viewport.

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

Get the viewport.

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

Reimplemented from osgUtil::RenderBin.

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.

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

Reimplemented from osgUtil::RenderBin.

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

Attempt the set the RenderStage from the Camera settings.

void osgUtil::RenderStage::setCamera ( osg::Camera camera)
inline
void osgUtil::RenderStage::setCameraAttachmentMapCount ( unsigned int  v)
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::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.

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

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

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

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

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

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::setInitialViewMatrix ( const osg::RefMatrix matrix)
inline

Set the initial view matrix.

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.

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

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

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

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

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

std::map< osg::Camera::BufferComponent, Attachment> osgUtil::RenderStage::_bufferAttachmentMap
protected
osg::observer_ptr<osg::Camera> osgUtil::RenderStage::_camera
protected
unsigned int osgUtil::RenderStage::_cameraAttachmentMapModifiedCount
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
Cameras osgUtil::RenderStage::_dependentCameras
protected
bool osgUtil::RenderStage::_disableFboAfterRender
protected
GLenum osgUtil::RenderStage::_drawBuffer
protected
bool osgUtil::RenderStage::_drawBufferApplyMask
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
mutableprotected
osg::Matrix osgUtil::RenderStage::_inheritedPositionalStateContainerMatrix
mutableprotected
osg::ref_ptr<const osg::RefMatrix> osgUtil::RenderStage::_initialViewMatrix
protected
unsigned int osgUtil::RenderStage::_level
protected
RenderStageList osgUtil::RenderStage::_postRenderList
protected
RenderStageList osgUtil::RenderStage::_preRenderList
protected
GLenum osgUtil::RenderStage::_readBuffer
protected
bool osgUtil::RenderStage::_readBufferApplyMask
protected
osg::ref_ptr<PositionalStateContainer> osgUtil::RenderStage::_renderStageLighting
mutableprotected
osg::ref_ptr<osg::FrameBufferObject> osgUtil::RenderStage::_resolveFbo
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:

osg logo
Generated at Wed Nov 11 2015 22:15:18 for the OpenSceneGraph by doxygen 1.8.10.