Re: get slice texture II

New Message Reply Date view Thread view Subject view Author view

From: Clark Dunson (dunson@cthulhu)
Date: 05/17/2000 18:37:35


Hi ww!

I don't have alot of experience with LUMINANCE, but I do know that a
common problem crops up with SoOffscreenRenderer. Most folks try to
assign the root node of their scene graph to the offscreen renderer.
They will typically try to use the same node they assigned to the
rendering area/viewer with setSceneGraph(). This will work for certain
applications, but often all they will see is the background color. The
reason is that the camera node they are looking through is assigned to
actually be ABOVE their root node with a few extra nodes by the viewer.
The answer is then to get the real root node of what they are looking
at. The standard way to do it is:

                // myViewerPtr = "your viewer pointer"
                // myOffscreen = "your SoOffscreen pointer"
                SoSceneManager *pSMgr = myViewerPtr->getSceneManager();
                SoNode *sceneGraphForPrint = pSMgr->getSceneGraph();
                if ( !myOffscreen->render( sceneGraphForPrint ) )
                        // Rendering failed.
                else
                        // Yee hah!

Good luck.



New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed May 17 2000 - 19:32:08 PDT