From e23176c3b6e47724c5a308bde73294090b107101 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 1 Nov 2005 15:39:26 +0000 Subject: [PATCH] Set the draw and read buffer to GL_NONE when using FBO's, thereby avoid invalid enumrates being generated. --- src/osgUtil/RenderStage.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/osgUtil/RenderStage.cpp b/src/osgUtil/RenderStage.cpp index 885f2c62d..5142d8e53 100644 --- a/src/osgUtil/RenderStage.cpp +++ b/src/osgUtil/RenderStage.cpp @@ -205,9 +205,9 @@ void RenderStage::runCameraSetUp(osg::State& state) osg::notify(osg::INFO)<<"Setting up osg::CameraNode::FRAME_BUFFER_OBJECT"<readPixels(_viewport->x(), _viewport->y(), _viewport->width(), _viewport->height(), pixelFormat, dataType); + } @@ -550,8 +549,6 @@ void RenderStage::drawInner(osg::State& state,RenderLeaf*& previous, bool& doCop (*(_camera->getPostDrawCallback()))(*_camera); } - state.checkGLErrors("before glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);"); - if (fbo_supported) { // switch of the frame buffer object @@ -560,9 +557,6 @@ void RenderStage::drawInner(osg::State& state,RenderLeaf*& previous, bool& doCop doCopyTexture = true; } - state.checkGLErrors("after glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);"); - - if (fbo_supported && _camera) { // now generate mipmaps if they are required.