Moved the testing and setting up of FBO/Pbuffer extension from CullVisitor to

support into RenderStage to allow better fallback implementations.
This commit is contained in:
Robert Osfield
2005-10-05 16:21:51 +00:00
parent 4b43b22c5a
commit 5cb66efc86
3 changed files with 239 additions and 209 deletions

View File

@@ -119,9 +119,14 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
/** Get the clear color.*/
int getClearStencil() const { return _clearStencil; }
void setCameraNode(const osg::CameraNode* camera) { _camera = camera; }
void setCameraNode(osg::CameraNode* camera) { if (_camera!=camera) { _camera = camera; _cameraRequiresSetUp = true; } }
osg::CameraNode* getCameraNode() { return _camera; }
const osg::CameraNode* getCameraNode() const { return _camera; }
void setCameraRequiresSetUp(bool flag) { _cameraRequiresSetUp = true; }
bool getCameraRequiresSetUp() const { return _cameraRequiresSetUp; }
void runCameraSetUp(osg::State& state);
void setTexture(osg::Texture* texture, unsigned int level = 0, unsigned int face=0) { _texture = texture; _level = level; _face = face; }
osg::Texture* getTexture() { return _texture.get(); }
@@ -216,7 +221,8 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin
double _clearDepth;
int _clearStencil;
const osg::CameraNode* _camera;
bool _cameraRequiresSetUp;
osg::CameraNode* _camera;
osg::ref_ptr<osg::Texture> _texture;
unsigned int _level;