I effectively already read this thread but it was a long time ago.. What I understand there is an advice of Group::traverse overriding..which is basically what i'm doing overriding Geometry::renderimpl() (considering a myGeometry as a 1 elmt Group)? Am I wrong?
J.P. Delport wrote: > Hi, > > On 03/06/10 15:12, Julien Valentin wrote: > > > Yes I came from it but the example show the result at each iteration and i > > want to show only the resulting pass > > Further more the convergence of the iterative method is given using > > occlusion query so i cant use osgppu... > > But thank for the advice > > > > OK, I understand better now. > > See this thread (if you haven't already): > http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/50502 > > jp > > > > > > > > > > J.P. Delport wrote: > > > > > Hi, > > > > > > another FBO ping pong technique (without overriding) is shown in the > > > osggameoflife example. > > > > > > You could also have a look at osgPPU. > > > > > > cheers > > > jp > > > > > > On 03/06/10 14:39, Julien Valentin wrote: > > > > > > > > > > Hello, > > > > > > > > I would like to do RTT via FBO . > > > > For this i overload osg::Geometry class > > > > and reimplements the drawimplementation method > > > > it now looks like it: > > > > > > > > Code: > > > > > > > > myGeometry::drawimplemetation(renderinfo)const{ > > > > > > > > (_ext)->glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbos[*_curst]); > > > > glPushAttrib(GL_VIEWPORT_BIT | GL_COLOR_BUFFER_BIT); > > > > osg::ref_ptr<osg::State> st=new osg::State; > > > > //load the pass dependant stateset > > > > st->apply(_StateSet[*_curst].get()); > > > > renderInfo.setState(st); > > > > glViewport(0,0,256, 256); > > > > > > > > // Set the render target > > > > glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); > > > > > > > > // Render as normal here > > > > // output goes to the FBO and it’s attached textures > > > > osg::Geometry::drawimplementation(renderinfo); > > > > > > > > glPopAttrib(); > > > > > > > > //pingpong the render passes > > > > if(*_curst==0)*_curst=1; > > > > else *_curst=0; > > > > } > > > > > > > > > > > > > > > > To do my prerender stuff i add a prerender camera that draw the stuff > > > > > > > > Code: > > > > > > > > _Camera->setClearMask(GL_DEPTH_BUFFER_BIT); > > > > // projection and view > > > > _Camera->setProjectionMatrix(osg::Matrix::ortho2D(0,_TextureHeight,0,_TextureHeight)); > > > > > > > > _Camera->setProjectionMatrix(osg::Matrix::ortho2D(0,1,0,1)); > > > > _Camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); > > > > _Camera->setViewMatrix(osg::Matrix::identity()); > > > > // viewport > > > > _Camera->setViewport(0, 0, _TextureWidth, _TextureHeight); > > > > _Camera->setRenderOrder(osg::Camera::PRE_RENDER,0); > > > > > > > > > > > > > > > > and an other camera that display the generated texture > > > > > > > > However I get an opengl error 0x506 > > > > I think it's due to the camera that handle the preprocess pass cause i > > > > don't know how to setup the render implementation as i overload it > > > > during myGeometry::drawimplementation > > > > > > > > Can anyone give me an advice on how to do it ? > > > > > > > > ------------------ > > > > Read this topic online here: > > > > http://forum.openscenegraph.org/viewtopic.php?p=28539#28539 > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > osg-users mailing list > > > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > > > > > > > > > -- > > > This message is subject to the CSIR's copyright terms and conditions, > > > e-mail legal notice, and implemented Open Document Format (ODF) standard. > > > The full disclaimer details can be found at > > > http://www.csir.co.za/disclaimer.html. > > > > > > This message has been scanned for viruses and dangerous content by > > > MailScanner, > > > and is believed to be clean. MailScanner thanks Transtec Computers for > > > their support. > > > > > > _______________________________________________ > > > osg-users mailing list > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > ------------------ > > > Post generated by Mail2Forum > > > > > > > > > ------------------ > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=28541#28541 > > > > > > > > > > > > _______________________________________________ > > osg-users mailing list > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > -- > This message is subject to the CSIR's copyright terms and conditions, e-mail > legal notice, and implemented Open Document Format (ODF) standard. > The full disclaimer details can be found at > http://www.csir.co.za/disclaimer.html. > > This message has been scanned for viruses and dangerous content by > MailScanner, > and is believed to be clean. MailScanner thanks Transtec Computers for their > support. > > _______________________________________________ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ------------------ > Post generated by Mail2Forum ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28546#28546 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

