Added a local osg::State to the pbuffer implementation.

This commit is contained in:
Robert Osfield
2003-09-24 18:54:28 +00:00
parent 243b288d87
commit 16216b991f
2 changed files with 7 additions and 4 deletions

View File

@@ -12,6 +12,7 @@
MyRenderToTextureStage::MyRenderToTextureStage()
{
_pbuffer = 0L;
_localState = new osg::State;
}
MyRenderToTextureStage::~MyRenderToTextureStage()
@@ -46,7 +47,7 @@ void MyRenderToTextureStage::draw(osg::State& state, osgUtil::RenderLeaf*& previ
_pbuffer->makeCurrent();
// Render in p-buffer.
RenderStage::draw(state,previous);
RenderStage::draw(*_localState,previous);
// restore window's context as current.
if (!::wglMakeCurrent(hdc, hglrc))