Hi Bret, The osg::Camera has initial/pre/post and final callbacks that can be used for the purpose of adding extra calls. It's also possible to use an osg::GraphicsOperation and attach this directly to the osg::GraphicsContext (equivalent to Producer::RenderSurface).
I would have though the Haptic's wouldn't be directly to OpenGL though so you could probably run the calls from the main loop i.e. not need a valid OpenGL graphics context, or even run the thread in background thread. I'm not familiar with the hatpic library though so I could be heading off in the wrong direction.. Robert. On Wed, Jan 6, 2010 at 8:15 PM, Brett Thomas Lee <brettle...@hotmail.com> wrote: > Hi, > > I am trying to convert some old osg library to the newer one. I want to > know corresponding classes and methods in current osg version as compared to > osgProducer and producer ones.Can some one help me please. > > Code: > > // Callback to be attached to camera rendering haptics view. Will start > haptic rendering frame > class HapticDevicePreRenderCallback: public Producer::Camera::Callback > > //corresponding class in osg for Producer::Camera::Callback > > > > > > Code: > > Producer::RenderSurface *rs = camera.getRenderSurface(); > m_device->updateWorkspace(rs->getWindowWidth(),rs->getWindowHeight()); > > //Here rendersurface gives width and height of the screen. > > > > > > Code: > > Producer::Camera *camera; > camera->addPreDrawCallback(new > osgHaptics::HapticDevicePreRenderCallback(device)); > camera->addPostDrawCallback(new > osgHaptics::HapticDevicePostRenderCallback(device)); > > > > > > Thank you! > > Cheers, > Brett > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=22182#22182 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org