Hi Fabian, There are couple of things at play here.
First up, be careful about the rendering order that the RTT Camera's are processed, use the Camera::setRenderOrder() method to make sure things are drawn in the order you require. Second, if you want the results form one graphics contexts in another graphics window then you will either have to share the OpenGL objects between the two contexts, or copy the results from one context to an image, then apply this image to a texture in the second window. With this you'll again need to be careful about rendering order - to the point that you'll need to syncronize the two windows such as by using a post draw/ pre draw threading barrier between the two windows if you are doing things multi-threaded. Getting the two windows to play nicely together is going to be awkward, far more awkward than just having keeping all the results in a single window, so my recommendation would be just just have a HUD within a single context. You could still use CompositeViewer for this, but the trick of simplification is to make sure that all the Camera's share the same context so you don't have any OpenGL object sharing issues, or any threading issues. Robert. On Wed, Aug 27, 2008 at 8:49 AM, Fabian Bützow <[EMAIL PROTECTED]> wrote: > Hi, > > my goal is to prerender a live camera image with several shader and display > the results of each shader step. > > I have a couple of prerender RTT cameras that have textured geometry quads > as children, the shaders are attached to the geometry. The output texture of > a camera is the input texture for the next rendered geometry quad. All the > cameras are attached to the root: > > To display the shader result, I created another geometry quad below the > root, with an output texture attached to it. > A View is set to the root with a camera observing the result geometry quad. > That works fine! > > But: > I want to display every shader step in a different window. Hence i created a > compositeViewer. > (Since i dont know if cameras can do both RTT and normal rendering i did the > following:) > For each shader output I created an additional geometry quad, textured with > the respective texture and attached to the root via a geode. > > However, a View attached to that geode does not show the output texture of > the shader, but the initialised texture value before the shader wrote to the > texture. > > How can that be when simultanously the result geometry quad (mentioned > above, with no View attached directly) shows the correct output?? > > Cheers, Fabian > > > > > _______________________________________________ > 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

