Hi Qingjie, On 9 September 2015 at 09:27, Qingjie Zhang <305479...@qq.com> wrote:
> Do you mean the DrawCallback in the Camera class, which contains > virtual void operator () (osg::RenderInfo& renderInfo) ? And here I can > use the RenderInfo right? > Yes. You can attach draw callbacks to Drawables, StateAtttribute and Camera's. > > As I know, the following code can get a contextID: > camera->getGraphicsContext()->getState()->getContextID(); > Is this contextID same as the upper one? > If you only need the contexID then getting it from the graphics context is perfectly fine. What route to take depends on when you need to do your queries. I would add that the TextureObject for each context is only created by the draw thread for each context, so the TextureObject won't exist right away when you create your osg::Texture and assign them to the scene graph. Robert.
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org