On 2010-02-04 20:44, Bastian Sdorra wrote: > Hello Carsten, > > thank you for the fast reply. > > On 04.02.2010 16:23, Carsten Neumann wrote: >> Hello Bastian, >> >> Bastian Sdorra wrote: >> >>> I try to render a small sub-tree of my scenegraph to a depth texture. >>> For this >>> purpose I use a combination of SimpleStageNode, VisitSubTreeNode and >>> FrameBufferObject. >>> >>> The sub-tree is encapsulated in an own class with a >>> renderDepthImage()-method on it, which does the depth to texture rendering. >>> I'm now wondering about the kind of window and viewport to use in the >>> class for the render call. >>> >> hm, you could render the depth texture as part of the normal scene, by >> adding your SimpleStage as the first child of the root node [1]. It >> would then use the window that is used to render the rest of the scene >> (but not affect what is visible in that window, it would still write to >> the depth texture). >> >> > Ah, I didn't think about that. But there's a problem, I don't have > access to the screen render window > to trigger a redraw at the point where I need the depth image. The > screen isn't constantly updated, > only on demand (user interaction or explicit update call). > It should be possible to change the code to work this way, but for > convenience and design reasons it > would be nice to have a independent entity, returning depth images on > demand.
You can make the context current in QGLWidget yourself, if you need to do something outside of paintGL(). That might help. However, you need the QGLWidget to keep the context. You might try with shared contexts (QGLWidget supports that) but I don't know how OpenSG reacts to that. Cheers, /Marcus ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users