Re: [osg-users] GLWidget resizeEvent
On 6.3.2013 9:36, Gianni Ambrosio wrote: Hi Robert, then there is something missing somewhere or a mistake from my side. I derived from osgQT::GLWidget to have a QGLWidget to insert in my GUI. The usual way to get to the osgQT::GLWidget is something like this: osg::ref_ptrosgQt::GraphicsWindowQt gwQt = new osgQt::GraphicsWindowQt( traits.get() ); camera-setGraphicsContext( gwQt.get() ); osgQt::GLWidget* glWidget = gwQt-getGLWidget(); // insert glWidget into GUI here If you must derive from osgQT::GLWidget then you will need to pass your custom GL widget to the GraphicsWindowQt constructor through GraphicsContext::Traits::inheritedWindowData or call GraphicsWindowQt constructor with your custom widget: traits-inheritedWindowData = new osgQT::GraphicsWindowQt::WindowData( myCustomGLWidget ); osg::ref_ptrosgQt::GraphicsWindowQt gwQt = new osgQt::GraphicsWindowQt( traits.get() ); // osg::ref_ptrosgQt::GraphicsWindowQt gwQt = new osgQt::GraphicsWindowQt( myCustomGLWidget ); camera-setGraphicsContext( gwQt.get() ); // insert myCustomGLWidget into GUI here I would first check if GLWidget/GraphicsWindow/Camera setup is done correctly. When the application starts I basically add an osgWidget::Widget (or even a osgWidget::Label) to an osgWidget::WindowManager. The problem is that all widgets have a small size even if the resizeEvent implementation of osgQt::GLWidget is executed. Only when I resize the Qt window containing the osgQt::GLWidget and the resizeEvent in executed again, the widgets are correctly resized. On the other side if I resize the Qt window before adding widgets to the osgWidget::WindowManager then, in this case, widgets are correctly shown immediately. I'm sorry but at the moment I don't have a simple example. If the GraphicsWindowQt *did pick the resize event* maybe all you need is to call viewer-frame() for the events to be processed by the osg. Also try with viewer-setRunFrameScheme(ON_DEMAND). This will prevent osg to discard accumulated events picked outside the predefined time frame. Robert Milharcic ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PolytopeIntersector distance and Transform
On 4.3.2013 11:05, Andreas Roth wrote: hanks to Aurelien for the work-around. Hi Andreas, That is of course my personal opinion, but i think PolytopeIntersector is overkill for most, if not all usage scenarios plus it doesn't work correctly on a scaled geometry. I simply took LineSegmentIntersector renamed it to IntersectorPrivate, added some sensitive area along picking vector, added suport for lines, points etc... As I remember it, it was pretty straight foward task... I'm not saying my solution is perfect nor thoroughly tested but it works well for our needs. Of course if someone would like to see what I did I can paste code here... Robert Milharcic ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] osgdem crash on win32
Hi, [SEMI - SOLVED ] The error I had was in the same machine I compiled it ( 32bit) . No way to make it working on that machine. I then tried the binary in a 64 machine and it works :-) Thank you! Cheers, Tonino -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52970#52970 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PolytopeIntersector distance and Transform
On Thu, Mar 7, 2013 at 4:53 AM, Robert Milharcic robert.milhar...@ib-caddy.si wrote: On 4.3.2013 11:05, Andreas Roth wrote: hanks to Aurelien for the work-around. Hi Andreas, That is of course my personal opinion, but i think PolytopeIntersector is overkill for most, if not all usage scenarios plus it doesn't work correctly on a scaled geometry. I simply took LineSegmentIntersector renamed it to IntersectorPrivate, added some sensitive area along picking vector, added suport for lines, points etc... As I remember it, it was pretty straight foward task... I'm not saying my solution is perfect nor thoroughly tested but it works well for our needs. Of course if someone would like to see what I did I can paste code here... The only reason we used the PI in osgEarth was to support line and point picking. So if you have a better solution that you are willing to share, we would be interested in evaluating it. Glenn Waldron / @glennwaldron ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PolytopeIntersector distance and Transform
Hi, I'm also interested if you have a solution to easily pick points lines ! Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52972#52972 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to render without a depth buffer ?
Hi, As a preprocessing, I need to render a lot of quads to a texure. I already have something working with a render to FBO, but since I don't use depth test and I disabled depth write, I'm looking for a way to save some GPU memory by avoid the use of a depth buffer. I tried this : p_camera-attach(osg::Camera::COLOR_BUFFER, _renderTexture); p_camera-detach(osg::Camera::DEPTH_BUFFER); To explicitly disable the depth buffer, but according to gDebuger, a depth buffer is still attached to my FBO. Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52973#52973 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to render without a depth buffer ?
Hi Aurelien, When we first implemented osg::Camera RTT using FBO's it was necessary to have a depth buffer otherwise the drivers would not be happy. I wouldn't thought this would be required now though. Places that manage the OpenGL side of attachments are in src/osg/Camera.cpp and src/osgUtil/RenderStage.cpp so have a look it for guides for defaults and how they are used when applying them to OpenGL. Robert. On 7 March 2013 13:26, Aurelien Albert aurelien.alb...@alyotech.fr wrote: Hi, As a preprocessing, I need to render a lot of quads to a texure. I already have something working with a render to FBO, but since I don't use depth test and I disabled depth write, I'm looking for a way to save some GPU memory by avoid the use of a depth buffer. I tried this : p_camera-attach(osg::Camera::COLOR_BUFFER, _renderTexture); p_camera-detach(osg::Camera::DEPTH_BUFFER); To explicitly disable the depth buffer, but according to gDebuger, a depth buffer is still attached to my FBO. Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52973#52973 ___ 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
Re: [osg-users] How to render without a depth buffer ?
Hi, Have you tried camera-setImplicitBufferAttachmentMask(osg::Camera::IMPLICIT_COLOR_BUFFER_ATTACHMENT); Pjotr -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52975#52975 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to render without a depth buffer ?
Hi Pjotr, This works, thanks a lot ! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52976#52976 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Using OpenSceneGraph with 3rd party window libraries
I'm using OpenSceneGraph with another library that also offers some rudimentary windowing code (on Windows right now). OpenSceneGraph works fine to create viewers and render, but as soon as I use the other library to create a window (which has really nothing to do with the OpenSceneGraph stuff, no GL contexts or anything just a few buttons for Run, Stop, quit, etc), the application crashes with an Access Violation inside OSG's GraphicsWindowWin32.cpp's handleNativeWindowingEvent. I presume it's intercepting window messages for this other window that it doesn't control. Is there any way to prevent this behavior? -- Randall Hand GPG Key: 4096R/F8CEF2FC http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xBD73D58EF8CEF2FC http://www.yeraze.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Per-view / per-camera effect control
Hi, I've been looking into the way to enable per-view (per-camera) control of the various visual effects. For example one of the effects is using camera position and orientation for computation of the object scale. I would like to add an object once into the scene graph, have multiple views and make sure that computation for the each view is done correctly (correct camera information is used). I am trying to use osg::Camera::DrawCallback as pre draw callback. And recompute objects scale there before each camera rendering. Is it the right way to go? Thank you! Cheers, Janna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52978#52978 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to set a node invisible but not its children?
I'm confused by what your trying to do. What in particular is in the parent node that is visible that you want to hide, and what do you have in the child node that needs to remain visible. Could you you give us a example of what your trying to do? Scott -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52979#52979 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Per-view / per-camera effect control
Hi Janna, There are a couple of ways of tackling per view specialization, 1) Use a custom Node::traverse(NodeVisitor) or NodeCallback that provides a specialized operation per cull traversal - either dynamically pushing state/modelview matrices onto the CullVisitor. You can look at the NodePath and current Camera that is being tracked by the CullVisitor to find out which window. Caching data can be done on a per CullVisitor basis - NodeKit's like osgShadow use this extensively by have local data structure cached for each cull visitor. 2) Use a per view cull TraversalMask on each View's master Camera to select a different path in the scene graph by matching the NodeMask of the subgraphs. The osgstereoimage example provides a simple example of this. 3) Use a DrawCallback as you have done. 4) Use a Uniform attached to StateSet attached to each View's master Camera and then use this uniform in a shader to determine what do for each view. Which route to take will depend on exactly what you are trying to achieve. For computing an object scale I'd suggest a custom cull callback or node that dynamically computes that modelview matrix approach for each view to scale the subgraph appropriately, the cull callback would push/pop the modelview matrix. Another route would be to use a custom Transform node that provides a custom computation of the modelview matrix. If you are going to be using this behavior a lot then a custom node might be the most sensible route forward. Robert. On 7 March 2013 16:30, Janna Terde brja...@gmail.com wrote: Hi, I've been looking into the way to enable per-view (per-camera) control of the various visual effects. For example one of the effects is using camera position and orientation for computation of the object scale. I would like to add an object once into the scene graph, have multiple views and make sure that computation for the each view is done correctly (correct camera information is used). I am trying to use osg::Camera::DrawCallback as pre draw callback. And recompute objects scale there before each camera rendering. Is it the right way to go? Thank you! Cheers, Janna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52978#52978 ___ 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
[osg-users] Using OpenSceneGraph with 3rd party window libraries
Hi Randall, but as soon as I use the other library to create a window ... the application crashes maybe others will give you better response, but I would suggest to set osg into single threaded mode Regards Sergey ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg crashes when remove child
Hi, I embed osg in wpf application with this code : http://www.openscenegraph.org/projects/osg/wiki/Support/FAQ#HowdoIembedanOSGviewerina.NETcontrol I load a scene of vrml files. osg::Group* root = new osgGroup(); for(int i = 0; i listFichiers.size(); i++){ osg::Node* node = osgDB::readNodeFile(listFichiers[i]); node-setDataVariance(osg::Object::DYNAMIC); root-addChild(node); } When I want to remove scene to load another scene (root-removeChildren(0,root-getNumChildren())), osg crashes with error : Debug assertion failed : Expression:(this-_Has_container(),0) ... The call stack is stop on this : osg80-osgd.dll!std::_Vector_const_iteratorosg::ref_ptrosg::Node,std::allocatorosg::ref_ptrosg::Node ::operator++() Ligne 116 + 0x3a octetsC++ osg80-osgd.dll!std::_Vector_iteratorosg::ref_ptrosg::Node,std::allocatorosg::ref_ptrosg::Node ::operator++() Ligne 350C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 60 + 0x8 octets C++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Switch::traverse(osg::NodeVisitor nv={...}) Ligne 40 + 0x77 octets C++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets
Re: [osg-users] osgSim::DOFTransform animation
Wouldn't it be simpler to create a dataType for the turret as well as update callback that will update the dof node with the incremental change during the update phase. Its been awhile for me but there should be example of this in the OSG Examples. This also might be useful: http://www.openscenegraph.org/documentation/NPSTutorials/osgUpdate.html If you create a interface to the dateType it would be possible to directly control where the node is pointing at. This could be useful if for example you need for a turret of tank to track a target tank.[/url] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52983#52983 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using OpenSceneGraph with 3rd party window libraries
Tried that, no change. Sergey Kurdakov March 7, 2013 11:00 AM Hi Randall,but as soon as I use the other library to create a window ... the application crashesmaybe others will give you better response, but I would suggest to set osg into single threaded modeRegardsSergey ___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Randall Hand March 7, 2013 9:03 AM I'm using OpenSceneGraph with another library that also offers some rudimentary windowing code (on Windows right now). OpenSceneGraph works fine to create viewers and render, but as soon as I use the other library to create a window (which has really nothing to do with the OpenSceneGraph stuff, no GL contexts or anything just a few buttons for "Run", "Stop", "quit", etc), the application crashes with an Access Violation inside OSG's GraphicsWindowWin32.cpp's handleNativeWindowingEvent. I presume it's intercepting window messages for this other window that it doesn't control. Is there any way to prevent this behavior? -- Randall Hand GPG Key: 4096R/F8CEF2FC http://www.yeraze.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgSim::DOFTransform animation
thanx wazman for the tip. the link included doesn't seem to work. i had to get DOFTransform to work because the work i was doing used a very old way of animating stuff using openflight (*.flt) and they use DOF nodes to do the animation. I will investigate using the osgUpdate. might need to make a different post but, if you are making models in blender and what to do a similar turret thing that you mentioned how would your export it from blender and import into osg and still preserve the texture layers and group nodes? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52985#52985 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg crashes when remove child
Hi Lucie, It seem that you try to remove children during cull pass (ie when cullVisitor go through sceneGraph). For each frame, the main loop use visitor to do many operation on scenegraph : even pass : EvenVisitor to dispatch even update pass : UpdateVisitor to allow Node/StateSet/... to update their values cull and draw pass : CullVisitor to select visible node in sceneGraph and construct RenderBin Graph. If you want to change scenegraph structure (ex remove children) you have to do it before even pass but not during a visitor do some stuff on SceneGraph. take a look to osgViewer::ViewerBase::frame() function where this 3 pass are done. HTH David 2013/3/7 lucie lemonnier lucielemonn...@hotmail.fr Hi, I embed osg in wpf application with this code : http://www.openscenegraph.org/projects/osg/wiki/Support/FAQ#HowdoIembedanOSGviewerina.NETcontrol I load a scene of vrml files. osg::Group* root = new osgGroup(); for(int i = 0; i listFichiers.size(); i++){ osg::Node* node = osgDB::readNodeFile(listFichiers[i]); node-setDataVariance(osg::Object::DYNAMIC); root-addChild(node); } When I want to remove scene to load another scene (root-removeChildren(0,root-getNumChildren())), osg crashes with error : Debug assertion failed : Expression:(this-_Has_container(),0) ... The call stack is stop on this : osg80-osgd.dll!std::_Vector_const_iteratorosg::ref_ptrosg::Node,std::allocatorosg::ref_ptrosg::Node ::operator++() Ligne 116 + 0x3a octetsC++ osg80-osgd.dll!std::_Vector_iteratorosg::ref_ptrosg::Node,std::allocatorosg::ref_ptrosg::Node ::operator++() Ligne 350C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 60 + 0x8 octets C++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++
Re: [osg-users] osg crashes when remove child
What is the DataVariance for root? It should be DYNAMIC. Or, you should be using SingleThreaded for your threading model, one or the other. On Thu, Mar 7, 2013 at 9:57 AM, lucie lemonnier lucielemonn...@hotmail.frwrote: Hi, I embed osg in wpf application with this code : http://www.openscenegraph.org/projects/osg/wiki/Support/FAQ#HowdoIembedanOSGviewerina.NETcontrol I load a scene of vrml files. osg::Group* root = new osgGroup(); for(int i = 0; i listFichiers.size(); i++){ osg::Node* node = osgDB::readNodeFile(listFichiers[i]); node-setDataVariance(osg::Object::DYNAMIC); root-addChild(node); } When I want to remove scene to load another scene (root-removeChildren(0,root-getNumChildren())), osg crashes with error : Debug assertion failed : Expression:(this-_Has_container(),0) ... The call stack is stop on this : osg80-osgd.dll!std::_Vector_const_iteratorosg::ref_ptrosg::Node,std::allocatorosg::ref_ptrosg::Node ::operator++() Ligne 116 + 0x3a octetsC++ osg80-osgd.dll!std::_Vector_iteratorosg::ref_ptrosg::Node,std::allocatorosg::ref_ptrosg::Node ::operator++() Ligne 350C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 60 + 0x8 octets C++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets C++ osg80-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Ligne 62 + 0x25 octetsC++ osg80-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Ligne 193 + 0x1c octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Ligne 312 + 0xf octets C++ osg80-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Ligne 1128 C++ osg80-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Ligne 38 + 0x41 octets
Re: [osg-users] osgSim::DOFTransform animation
Sorry about the link.. Try this http://www.openscenegraph.org/documentation/NPSTutorials/osgUpdate.htm I found the link above to be very helpful. I've used blender in the past but not since they updated to the latest version. You should be able to export a to osg like file. I prefer OpenFlight myself for the DOF node ability. Try looking at Remo3D it a very useful tool in regards to .flt files. You can download a demo program to check it out. I liked it so much that I actually purchased a single dongle license. http://www.remograph.com/index.php hope this helps. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52989#52989 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgSim::DOFTransform animation
awesome...thanx for the link. as for the use of open flight i am trying to get away from that and use more of an open source format and solution for the generation of content. trying to make this world less of what you have and more of what you want to create... great work everyone... -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52990#52990 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Custom NodeVistor injected in the DatabasePager
Hi Robert, I took a look at this. Here is the ReadFileCallback method I am interested in: virtual ReaderWriter::ReadResult readNode(const std::string filename, const Options* options); What I was expecting here was access the osg::Node that was loaded, so I can apply a NodeVisitor prior to attaching it to the scene Any hint? Thanks On Fri, Mar 1, 2013 at 12:04 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Nick, On 1 March 2013 10:36, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: I am working with txp database and using shaders per nodes in the scene so I come with a need to inject a NodeVisitor when a portion of a database is paged in. Any hints for this? Robert? The easist way to manage doing special operations on the loading scene graph is to use an osgDB::Registry::ReadFileCallback that allows to you to interecept the read call do the read operation then post process the loaded scene graph before you pass it back. This works for all read operations including the database pager. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Custom NodeVistor injected in the DatabasePager
Hi Robert, was thinking more about this. Is the responsibility to load the model on the callback? If so, then I got the idea Please let me know Thanks Nick On Thu, Mar 7, 2013 at 11:39 PM, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Robert, I took a look at this. Here is the ReadFileCallback method I am interested in: virtual ReaderWriter::ReadResult readNode(const std::string filename, const Options* options); What I was expecting here was access the osg::Node that was loaded, so I can apply a NodeVisitor prior to attaching it to the scene Any hint? Thanks On Fri, Mar 1, 2013 at 12:04 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Nick, On 1 March 2013 10:36, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: I am working with txp database and using shaders per nodes in the scene so I come with a need to inject a NodeVisitor when a portion of a database is paged in. Any hints for this? Robert? The easist way to manage doing special operations on the loading scene graph is to use an osgDB::Registry::ReadFileCallback that allows to you to interecept the read call do the read operation then post process the loaded scene graph before you pass it back. This works for all read operations including the database pager. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Custom NodeVistor injected in the DatabasePager
On 7 March 2013 22:56, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Robert, was thinking more about this. Is the responsibility to load the model on the callback? If so, then I got the idea Please let me know Yep, it's the responsibility of the ReadFileCallback to do the reading - typically you just call the underlying Registry read methods to load the file, have a look at the default implementation of the ReadFileCallback to see how it's done. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Custom NodeVistor injected in the DatabasePager
Thanks ! Nick On Fri, Mar 8, 2013 at 12:05 AM, Robert Osfield robert.osfi...@gmail.comwrote: On 7 March 2013 22:56, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Robert, was thinking more about this. Is the responsibility to load the model on the callback? If so, then I got the idea Please let me know Yep, it's the responsibility of the ReadFileCallback to do the reading - typically you just call the underlying Registry read methods to load the file, have a look at the default implementation of the ReadFileCallback to see how it's done. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org