Hello Johannes, Johannes Brunen wrote: > Do I need a TextureBuffer object in order to get the final rendered image? > I.e. can I build a FBO setup for my scene with three RenderBuffers for > color, depth and stencil in analogy to the render window?
never use separate depth and stencil buffers (not supported by hardware), use one buffer with the DEPTH_24_STENCIL_8 format and add is both as depth and stencil attachment. > I would like to > avoid the TextureBuffer, since I did read, that the TextureBuffer does not > support stencil and multisampling(?). you can use RenderBuffers. A TextureBuffer is needed if you want to use the rendering output as a texture. You can also use TextureBuffers for some attachments (color) and RenderBuffers for others (depth+stencil). > Do I need a special SimpleStage object or can I attach the FrameBufferObject > directly to the internal root node(s) of my scene? you need a SimpleStage so the renderer knows that you want to render to an FBO. > Can I share the FBO camera and the background with the respective objects > handled by my scene manager. yes. > Can I use a FBO to render all of my views into the FBO's render buffers? I think so, you probably need multiple SimpleStages to render to different parts of the FBO. > How should I handle the render action? I have a 'CompositeViewer' object > which handles the 'view' setup of my scene as well as the render window. > Additionally, it manages the render action and provides a 'redraw' method > which simply delegates to the window's 'render' interface. My 'view' objects > are thin wrappers around the OpenSG viewport, background, camera and my > 'scene manager' objects . The 'scene manager', finally, holds the scene with > light definition and camera setup. I once used the OpenSG simple scene > manager as starting point of these classes. > > My goal would be to setup a FBO on the level of my CompositeViewer. Then to > render with the provided redraw interface [_win->render(_action)] i.e. > render all of my viewports and to get hand on an image taken from the FBO > color buffer (RenderBuffer). After that I would like to remove the FBO and > to render my window as normally done with may redraw interface. Is this > feasible? add another (dummy) viewport to your window that has a scene like this: root [Group] | +-- view0 [SimpleStage] -- scene0 [VisitSubTree] | +-- view1 [SimpleStage] -- scene1 [VisitSubTree] ... the SimpleStages mimic the views on your app window and the VisitSubTrees point to the roots of scenes shown in those views. The dummy viewport only exists to trigger traversal of the above scene (which fills your FBO when rendered). > I would like to stretch that I actually have multiple viewports with > separate scenes with separate cameras and backgrounds. It is also possible > that the viewports are overlapping. These viewport all render into the same > window which might be a application driven passive window. ok, the overlapping will require that the SimpleStages above are in the same order as your viewports so that everything gets rendered in the same order. > Any hint and help would be welcomed. I think that my problem is that I do > not have thorougly understand the OpenSG FBOs and render buffers. FBOs and their buffer attachments don't do much other than specifying where pixels get written and in what format. The IMHO interesting part is how to redirect rendering output to not go to the app framebuffer but to the FBO instead, which you can do with the Stages. Cheers, Carsten ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users