On Jul 30, 2010, at 1:40 PM, Carsten Neumann wrote: > Hello Patrick, > > Patrick Hartling wrote: >> When using OSG::GrabForeground with OpenSG 2, I find that some parts of the >> scene graph are not being grabbed. Is there anything besides the traversal >> mask on the viewport that influences grabbing? The viewport has a traversal >> mask of 0x1, and as far as I can tell, the nodes that are not being captured >> have a mask of 0xffffffff. Of the 4151 nodes in the scene graph I just >> tested, only 4 do not have a mask of 0xfffffff, and those four being >> included with the image output just as I expect. > > the GrabForeground simple does a glReadPixels to copy the application > frame buffer into it's image. It should not have any influence on what > is being rendered, especially since all Foregrounds have their draw() > method called after the scene rendering is already done.
That's what I thought from looking at the OSG::Viewport and OSG::GrabForeground code, but I thought maybe I was missing some subtle detail. >> In case it makes any difference, the nodes that are being missed are loaded >> from OSB files. We are using a custom render action, but it is a simple >> subclass of OSG::RenderAction that adds two data members needed as a >> conveniences for other parts of our software. The only method that we >> override is OSG::RenderAction::start(), and that is just so that we can set >> a value for one of the two added data members. The override calls up to >> OSG::RenderAction::start() just as it ought to. > > Do the missed nodes show up when rendering without the GrabForeground? Yes. > What happens if you load the OSB files with e.g. testSimpleSceneManager? I tried loading some at random using testSimpleSceneManager, and it had no difficulty with any. > Have you tried to run the VerifyGeoGraphOp on the problematic nodes (not > that it can catch all errors with geometry, but it does find a few > obvious ones)? OSG::VerifyGeoGraphOp does not report problems for any of the 1600+ models that I have. > From what you describe I don't see how the custom RenderAction could be > a problem or the GrabForeground for that matter. Can you give some more > details on your setup, please. I believe something else must be involved > to prevent the nodes from rendering. Our custom scene manager has a viewport with an grab foreground associated with it at all times. The viewport is associated with a passive window that is itself driven by a Qt 4 QGLWidget. The grab foreground is deactivated except when we want to capture what OpenSG will render. When we do that, we activate the grab foreground, force the window to render using the same render action object used for "normal" rendering, and then disable the grab foreground again. This all works like a charm except for these models. -Patrick -- Patrick L. Hartling Senior Software Engineer, Priority 5 http://www.priority5.com/ The information transmitted in this communication is intended only for the person or entity to which it is addressed and contains proprietary material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please destroy any copies, contact the sender and delete the material from any computer. ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users