14#ifndef OSGUTIL_RENDERSTAGE
15#define OSGUTIL_RENDERSTAGE 1
52 virtual const char*
className()
const {
return "RenderStage"; }
277 typedef std::vector< osg::ref_ptr<osg::Camera> >
Cameras;
Matrixd Matrix
Definition Matrix:27
Vec4f Vec4
Definition Vec4:21
RefMatrixd RefMatrix
Definition Matrix:28
The osgUtil library provides general purpose utility classes such as update, cull and draw traverses,...
Definition NodeVisitor:25
Camera - is a subclass of Transform which represents encapsulates the settings of a Camera.
Definition Camera:45
BufferComponent
Definition Camera:326
Encapsulates OpenGL glColorMaskFunc/Op/Mask functions.
Definition ColorMask:25
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition FrameBufferObject:321
Base class for providing Windowing API agnostic access to creating and managing graphics context.
Definition GraphicsContext:30
Image class for encapsulating the storage texture image data.
Definition Image:179
Base class/standard interface for objects which require IO support, cloning and reference counting.
Definition Object:61
Smart pointer for observed objects, that automatically set pointers to them to null when they are del...
Definition observer_ptr:39
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings,...
Definition State:80
Base class for state attributes.
Definition StateAttribute:77
Texture pure virtual base class that encapsulates OpenGL texture functionality common to the various ...
Definition Texture:422
Encapsulate OpenGL glViewport.
Definition Viewport:24
PositionalStateContainer base class.
Definition PositionalStateContainer:30
SortMode
Definition RenderBin:42
Container class for all data required for rendering of drawables.
Definition RenderLeaf:34
bool _cameraRequiresSetUp
Definition RenderStage:300
void setMultisampleResolveFramebufferObject(osg::FrameBufferObject *fbo)
Sets the destination framebuffer object for glBlitFramebufferEXT to resolve a multisampled framebuffe...
virtual void drawPostRenderStages(osg::RenderInfo &renderInfo, RenderLeaf *&previous)
void setCamera(osg::Camera *camera)
Definition RenderStage:141
virtual void addPositionedAttribute(osg::RefMatrix *matrix, const osg::StateAttribute *attr)
Definition RenderStage:210
std::pair< int, osg::ref_ptr< RenderStage > > RenderStageOrderPair
Definition RenderStage:41
osg::ref_ptr< PositionalStateContainer > _renderStageLighting
Definition RenderStage:321
unsigned int _cameraAttachmentMapModifiedCount
Definition RenderStage:301
const RenderStageList & getPostRenderList() const
Definition RenderStage:244
osg::GraphicsContext * getGraphicsContext()
Definition RenderStage:190
osg::Vec4 _clearAccum
Definition RenderStage:296
void addPostRenderStage(RenderStage *rs, int order=0)
const osg::FrameBufferObject * getFrameBufferObject() const
Definition RenderStage:172
bool getDisableFboAfterRender() const
Definition RenderStage:187
GLenum getImageReadPixelFormat() const
Definition RenderStage:162
virtual unsigned int computeNumberOfDynamicRenderLeaves() const
Compute the number of dynamic RenderLeaves.
bool getStats(Statistics &stats) const
Extract stats for current draw list.
const osg::GraphicsContext * getGraphicsContext() const
Definition RenderStage:191
GLenum getDrawBuffer() const
Get the draw buffer used at the start of each frame draw.
Definition RenderStage:61
std::vector< osg::ref_ptr< osg::Camera > > Cameras
Definition RenderStage:277
void copyTexture(osg::RenderInfo &renderInfo)
GLenum getImageReadPixelDataType() const
Definition RenderStage:165
bool _drawBufferApplyMask
Definition RenderStage:290
bool _readBufferApplyMask
Definition RenderStage:292
RenderStageList & getPostRenderList()
Definition RenderStage:245
void setInheritedPositionalStateContainerMatrix(const osg::Matrix &matrix)
Definition RenderStage:196
virtual void drawPreRenderStages(osg::RenderInfo &renderInfo, RenderLeaf *&previous)
void addPreRenderStage(RenderStage *rs, int order=0)
const osg::Matrix & getInheritedPositionalStateContainerMatrix() const
Definition RenderStage:197
const osg::Camera * getCamera() const
Definition RenderStage:143
void setCameraRequiresSetUp(bool flag)
Definition RenderStage:145
void setTexture(osg::Texture *texture, unsigned int level=0, unsigned int face=0)
Definition RenderStage:155
void setImageReadPixelFormat(GLenum format)
Definition RenderStage:161
virtual void releaseGLObjects(osg::State *state=0) const
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics...
bool getCameraRequiresSetUp() const
Definition RenderStage:146
void setDrawBuffer(GLenum buffer, bool applyMask=true)
Set the draw buffer used at the start of each frame draw.
Definition RenderStage:58
void setCameraAttachmentMapCount(unsigned int v)
Definition RenderStage:148
osg::Image * getImage()
Definition RenderStage:159
osg::ref_ptr< const osg::RefMatrix > _initialViewMatrix
Definition RenderStage:287
RenderStageList & getPreRenderList()
Definition RenderStage:242
double getClearDepth() const
Get the clear depth.
Definition RenderStage:131
bool _stageDrawnThisFrame
Definition RenderStage:279
void addToDependencyList(RenderStage *rs)
Definition RenderStage:235
osg::ref_ptr< osg::Texture > _texture
Definition RenderStage:304
osg::ref_ptr< osg::GraphicsContext > _graphicsContext
Definition RenderStage:316
int _clearStencil
Definition RenderStage:298
virtual void drawImplementation(osg::RenderInfo &renderInfo, RenderLeaf *&previous)
virtual osg::Object * clone(const osg::CopyOp ©op) const
Clone an object, with Object* return type.
Definition RenderStage:50
void setInitialViewMatrix(const osg::RefMatrix *matrix)
Set the initial view matrix.
Definition RenderStage:94
void setInheritedPositionalStateContainer(PositionalStateContainer *rsl)
Definition RenderStage:199
virtual void drawInner(osg::RenderInfo &renderInfo, RenderLeaf *&previous, bool &doCopyTexture)
osg::FrameBufferObject * getFrameBufferObject()
Definition RenderStage:171
int getClearStencil() const
Get the clear color.
Definition RenderStage:138
bool getReadBufferApplyMask() const
Get the apply mask defining whether glReadBuffer is called at each frame draw.
Definition RenderStage:78
GLenum getReadBuffer() const
Get the read buffer for any required copy operations to use.
Definition RenderStage:75
RenderStageList _postRenderList
Definition RenderStage:281
osg::Texture * getTexture()
Definition RenderStage:156
void setGraphicsContext(osg::GraphicsContext *context)
Definition RenderStage:189
void attach(osg::Camera::BufferComponent buffer, osg::Image *image)
osg::ref_ptr< osg::Viewport > _viewport
Definition RenderStage:286
void setFrameBufferObject(osg::FrameBufferObject *fbo)
Set a framebuffer object to render into.
Definition RenderStage:170
osg::ref_ptr< osg::Image > _image
Definition RenderStage:308
std::map< osg::Camera::BufferComponent, Attachment > _bufferAttachmentMap
Definition RenderStage:312
void setViewport(osg::Viewport *viewport)
Set the viewport.
Definition RenderStage:85
void clearReferencesToDependentCameras()
clear the references to any dependent cameras.
void runCameraSetUp(osg::RenderInfo &renderInfo)
Attempt the set the RenderStage from the Camera settings.
virtual bool isSameKindAs(const osg::Object *obj) const
Definition RenderStage:51
void setClearMask(GLbitfield mask)
Set the clear mask used in glClear(..).
Definition RenderStage:101
Cameras _dependentCameras
Definition RenderStage:283
virtual osg::Object * cloneType() const
Clone the type of an object, with Object* return type.
Definition RenderStage:49
void setDrawBufferApplyMask(bool applyMask)
Set the apply mask defining whether glDrawBuffer is called at each frame draw.
Definition RenderStage:67
bool _disableFboAfterRender
Definition RenderStage:317
osg::observer_ptr< osg::Camera > _camera
Definition RenderStage:302
osg::Camera * getCamera()
Definition RenderStage:142
const osg::RefMatrix * getInitialViewMatrix()
Get the initial view matrix.
Definition RenderStage:97
const osg::ColorMask * getColorMask() const
Definition RenderStage:109
virtual const char * className() const
return the name of the object's class type.
Definition RenderStage:52
const osg::FrameBufferObject * getMultisampleResolveFramebufferObject() const
Definition RenderStage:181
const osg::Vec4 & getClearAccum() const
Get the clear accum.
Definition RenderStage:124
RenderStage(SortMode mode)
const osg::Vec4 & getClearColor() const
Get the clear color.
Definition RenderStage:117
osg::ref_ptr< osg::FrameBufferObject > _resolveFbo
Definition RenderStage:315
osg::ref_ptr< PositionalStateContainer > _inheritedPositionalStateContainer
Definition RenderStage:320
osg::ref_ptr< osg::ColorMask > _colorMask
Definition RenderStage:294
const RenderStageList & getPreRenderList() const
Definition RenderStage:241
GLbitfield _clearMask
Definition RenderStage:293
osg::Matrix _inheritedPositionalStateContainerMatrix
Definition RenderStage:319
osg::Vec4 _clearColor
Definition RenderStage:295
void setClearColor(const osg::Vec4 &color)
Set the clear color used in glClearColor(..).
Definition RenderStage:114
osg::ColorMask * getColorMask()
Definition RenderStage:108
void setColorMask(osg::ColorMask *cm)
Definition RenderStage:107
void setPositionalStateContainer(PositionalStateContainer *rsl)
Definition RenderStage:202
osg::FrameBufferObject * getMultisampleResolveFramebufferObject()
Definition RenderStage:180
unsigned int _face
Definition RenderStage:306
bool getDrawBufferApplyMask() const
Get the apply mask defining whether glDrawBuffer is called at each frame draw.
Definition RenderStage:64
const osg::Viewport * getViewport() const
Get the const viewport.
Definition RenderStage:88
PositionalStateContainer * getInheritedPositionalStateContainer()
Definition RenderStage:200
GLbitfield getClearMask() const
Get the clear mask.
Definition RenderStage:104
void setClearStencil(int stencil)
Set the clear stencil value used in glClearStencil().
Definition RenderStage:135
GLenum _imageReadPixelDataType
Definition RenderStage:310
osg::ref_ptr< osg::FrameBufferObject > _fbo
Definition RenderStage:314
void setClearDepth(double depth)
Set the clear depth used in glClearDepth(..).
Definition RenderStage:128
RenderStage(const RenderStage &rhs, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
void setReadBuffer(GLenum buffer, bool applyMask=true)
Set the read buffer for any required copy operations to use.
Definition RenderStage:72
RenderStageList _preRenderList
Definition RenderStage:280
unsigned int getCameraAttachmentMapCount()
Definition RenderStage:149
void setImageReadPixelDataType(GLenum type)
Definition RenderStage:164
virtual void draw(osg::RenderInfo &renderInfo, RenderLeaf *&previous)
void setReadBufferApplyMask(bool applyMask)
Set the apply mask defining whether glReadBuffer is called at each frame draw.
Definition RenderStage:81
GLenum _drawBuffer
Definition RenderStage:289
unsigned int _level
Definition RenderStage:305
GLenum _imageReadPixelFormat
Definition RenderStage:309
void setDisableFboAfterRender(bool disable)
Set whether the framebuffer object should be unbound after rendering.
Definition RenderStage:186
void collateReferencesToDependentCameras()
search through any pre and post RenderStage that reference a Camera, and take a reference to each of ...
void setImage(osg::Image *image)
Definition RenderStage:158
PositionalStateContainer * getPositionalStateContainer() const
Definition RenderStage:204
double _clearDepth
Definition RenderStage:297
void setClearAccum(const osg::Vec4 &color)
Set the clear accum used in glClearAccum(..).
Definition RenderStage:121
std::list< RenderStageOrderPair > RenderStageList
Definition RenderStage:42
virtual void addPositionedTextureAttribute(unsigned int textureUnit, osg::RefMatrix *matrix, const osg::StateAttribute *attr)
Definition RenderStage:215
osg::Viewport * getViewport()
Get the viewport.
Definition RenderStage:91
GLenum _readBuffer
Definition RenderStage:291
Definition RenderStage:254
osg::ref_ptr< osg::Image > _image
Definition RenderStage:255
GLenum _imageReadPixelDataType
Definition RenderStage:257
GLenum _imageReadPixelFormat
Definition RenderStage:256
Statistics base class.
Definition Statistics:48
#define OSGUTIL_EXPORT
Definition Export:40