Frederic Marmond wrote on Wednesday, September 23, 2009 10:03 AM:
> I'm making a study on how integrate OSG inside an external openGL
engine.
> I know it's not the best use of osg, ok... :)
> 
> So I used osgViewer::Viewer::setUpViewerAsEmbeddedInWindow() as a
start.
> It's ok, as long as I don't modify the opengl state outside OSG.
> => how may I force OSG to consider the opengl state has changed (and
> so, re-apply all its states) ?

I can answer this question: see the haveApplied*() functions in
osg::State. Of course, Robert's answer will be easier though :)

I'm not sure what the best way to get the State is; you might try
attaching a preDrawCallback to the viewer's Camera, or perhaps
GraphicsContext::setState() (via viewer.getContexts()).

> => using that technique, would I be able to cull / draw osg stuff in
> separate threads (handled by the hosting engine) ?
> 
> thanks in advance for any answer or tips...


-- 
Bryan Thrall
FlightSafety International
[email protected]
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to