Hi Sebastian, [EMAIL PROTECTED] wrote: > Hi, > > I'm just starting using OpenSG and have a simple (newbie) question. > I am looking for a method to draw simple lines between two points. > Is there another method for drawing lines than using the OSG::Line? > Or do i have to stretch a polygon in a 'line-like' form?
the "ordinary" way to draw something is to make it an object in the scene, i.e. (for most things) to build a Geometry and make it the core of a Node that is added to the scene (please see the tutorial at <http://opensg.vrsource.org/trac/wiki/Tutorial/OpenSG1/Geometry> on how to build a geometry). Depending on how you have set up you application you can also issue OpenGL calls directly. If you are using the SimpleSceneManager this is a bit tricky, because it does the buffer swapping internally, when you call redraw(). Therefore you need to replace mgr->redraw(); with: mgr->getWindow()->activate(); mgr->getWindow()->frameInit(); mgr->getWindow()->renderAllViewports( dynamic_cast<RenderActionBase *>(mgr->getAction())); // your OpenGL calls here mgr->getWindow()->swap(); mgr->getWindow()->frameExit(); Hope it helps, Carsten ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
