Hi Robert, In our application we open several windows, on the order of 10 at a time. In each window we render a viewpoint into the scene. Then we capture each window individually and send each video image frame from each window down the network. Incidentally we use Unreal Streaming Technologies (http://www.umediaserver.net/index.html) media server products for that part.
What is happening is that either because we have so many windows, or because of operating system windows (this all runs on Windows XP) being displayed on the screen, when one window overlaps another, it corrupts that part of the image. So basically we want to fix that problem. Make sense? As I wrote, using the osg::Camera::FRAME_BUFFER_OBJECT render implementation mostly works, except that the on-screen window has garbage in it. We want to be able to see the on-screen window for debugging and "proof-the-system-is-working", especially once we deliver the system to our customer. -Jon -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Monday, June 16, 2008 3:07 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osg::Camera::FRAME_BUFFER_OBJECT, on-screen windows not reflecting rendered image Hi Jon, I can't work out exactly what you are trying to achieve with your render "offscreen". So could you please from a high level explain what effect you are trying to achieve. Robert. On Fri, Jun 13, 2008 at 1:07 AM, Goldman, Jon <[EMAIL PROTECTED]> wrote: > Hi, > > I am somewhat new to OpenSceneGraph. For my project we need to render > "offscreen" -- so that overlapping windows do not corrupt the rendered image. > We are using osg::Camera::FRAME_BUFFER_OBJECT render implementation, and > getting the core behaviour we want, which is to say that we can extract the > correctly rendered pixels from the image attached to the camera/frame buffer > object. > > However, I still have two issues, and a question on performance: > > 1) The on-screen window is not showing the rendered image. Instead it is > filled with garbage (or black) pixels. The question is what is the best way > to reflect the contents of the fbo image? Should we do as osgprerender > example does and create some geometry (osg::Geometry) and then texturemap the > image onto the surface, or is there another (better?) way to push the pixels > into the framebuffer so that the on-screen window displays properly? > > 2) using osg::Camera::PIXEL_BUFFER_RTT render implementation crashes on our > system. We are running 32-bit Windows XP with dual SLI-graphics NVIDIA 5600 > cards. I didn't spend a lot of time on this problem, mainly wondering if > others are seeing the same? > > 3) Question: Any recommendation(s) on ways to increase/maximize performance > when using fbo? > > > Here is a code snippet showing how we are currently setting up the fbo: > > . > . > . > osg::Image * fboImage = new osgImage(); > fboImage->allocateImage( width, height, 1, GL_RGB, GL_UNSIGNED_BYTE); > > wc->cameraPostRenderCB = new WindowCapturePostDrawCallback(wc->getView(), > fboImage, NULL); > > // attach the image so it's copied on each frame. > > theCamera->attach( osg::Camera::COLOR_BUFFER, fboImage); > > osg::Camera::RenderTargetImplementation renderImplementation; > renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT; > > // tell the camera to use OpenGL frame buffer object where supported. > theCamera->setRenderTargetImplementation(renderImplementation); > > // set the post render callback > theCamera->setPostDrawCallback(wc->cameraPostRenderCB); > . > . > . > > > Thanks, > -Jon Goldman > Sandia National Laboratories > Albuquerque, New Mexico > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

