<div dir="ltr">Hi Qingjie,<div class="gmail_extra"><br><div class="gmail_quote">On 9 September 2015 at 09:27, Qingjie Zhang <span dir="ltr"><<a href="mailto:305479421@qq.com" target="_blank">305479421@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Do you mean the DrawCallback in the Camera class, which contains<br>
virtual void operator () (osg::RenderInfo& renderInfo) ? And here I can use the RenderInfo right?<br></blockquote><div><br></div><div>Yes.  You can attach draw callbacks to Drawables, StateAtttribute and Camera's.<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
As I know, the following code can get a contextID:<br>
camera->getGraphicsContext()->getState()->getContextID();<br>
Is this contextID same as the upper one?<br><span class=""></span></blockquote><div><br></div><div>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.<br><br></div><div>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.<br></div><div><br></div><div>Robert.<br></div><div> </div></div></div></div>