Hi Sohpie, You haven't yet explained what type of application/viewer you are trying to embed the OSG in, so there isn't too much we can advise specifically.
Perhaps using the osgViewer::GraphicsWindowEmbedded adapter would be appropriate. Have a look at the osgviewerSDL osg example to see how it's set up. It illustrates how one can provide a graphics context and have the OSG just render to that context. Robert. On 17 March 2015 at 14:33, Sophie Audonneau < sophie.audonne...@etu.univ-lorraine.fr> wrote: > Hi, > > I have tried a few things unfortunately without success. > > I tried to use Qt as I could get the Qwidget used by the software and I > hoped that it could be passed to OpenSceneGraph through osgQt but it seems > that my current window is replaced anyway. > > To load my data I need to use the setSceneData() function which is only > implemented in View and Scene classes. I guess that I need to create one of > those objects in any case. > However in View constructor the font colour is already set > (_camera->setClearColor(osg::Vec4f(0.2f, 0.2f, 0.4f, 1.0f)); ) which is > exactly what I don't want. > To avoid creating a new openGL context, I thought that it may be possible > to override functions that are responsible of the creation of the new > context. > > I read that it was possible to create my own rendering loop. From what I > understood the ViewerBase renderingTraversal() function is actually > responsible of rendering and calls low-level OpenGL to render the scene. > But I can hardly identify which low-level OSG calls I have to use. > > What do you think would be the best solution ? > > Thank you! > > Cheers, > Sophie > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=63132#63132 > > > > > > _______________________________________________ > 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