From Mauricio Hofmam, added support for reading images from all osg::CameraNode attachments in RenderStage.

This commit is contained in:
Robert Osfield
2006-11-27 11:25:40 +00:00
parent 60a975d05d
commit b82e521444
2 changed files with 41 additions and 26 deletions

View File

@@ -200,7 +200,17 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
/** Extract stats for current draw list. */
bool getStats(Statistics& stats) const;
struct Attachment
{
osg::ref_ptr<osg::Image> _image;
GLenum _imageReadPixelFormat;
GLenum _imageReadPixelDataType;
};
void attach(osg::CameraNode::BufferComponent buffer, osg::Image* image);
protected:
@@ -236,6 +246,8 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
GLenum _imageReadPixelFormat;
GLenum _imageReadPixelDataType;
std::map< osg::CameraNode::BufferComponent, Attachment> _bufferAttachmentMap;
osg::ref_ptr<osg::FrameBufferObject> _fbo;
osg::ref_ptr<osg::GraphicsContext> _graphicsContext;