Re: [osg-users] Record the time of update traversal and cull traversal

2015-06-01 Thread Xia Baobao
at 17:43, Xia Baobao wrote: Hi, Thanks to osgViewer::StatsHandler, I can see the time of update traversal, cull traversal, draw and so on. However, I am unable to record them. Now I want to collect the time of update traversal and cull traversal of each frame, and write them to files

[osg-users] Record the time of update traversal and cull traversal

2015-05-29 Thread Xia Baobao
Hi, Thanks to osgViewer::StatsHandler, I can see the time of update traversal, cull traversal, draw and so on. However, I am unable to record them. Now I want to collect the time of update traversal and cull traversal of each frame, and write them to files. How to? Thank you! Cheers, Xia

[osg-users] serializer,custom node with custom nodecallback

2015-05-11 Thread Xia Baobao
Hi, I want to implement a custom node with a custom nodecallback by serializer. I have read a chapter of serializer in OpenSceneGraph 3.0 Beginner's Guide and this webpage - http://trac.openscenegraph.org/projects/osg//wiki/Support/KnowledgeBase/SerializationSupport I know how to implement a

Re: [osg-users] DotOsgWrapper. Are there any tutorials, example, or anything else that could help me learn about DotOsgWrapper.

2015-05-08 Thread Xia Baobao
in the OpenSceneGraph/src/osgWrappers/serializers/* directories. You don't need to create plugins to provide serializers, you can add them directly to you application and they'll be automatically registered. Robert. On 8 May 2015 at 03:34, Xia Baobao wrote: Hi, I think I need to use

[osg-users] DotOsgWrapper. Are there any tutorials, example, or anything else that could help me learn about DotOsgWrapper.

2015-05-07 Thread Xia Baobao
Hi, I think I need to use DotOsgWrapper in my program. But I didn't find much about it. The most helpful material I found so far is this topic. But I am not sure I can get through with it. http://forum.openscenegraph.org/viewtopic.php?p=16629#16629 So, recommend me some if you know. I think

Re: [osg-users] How to make the change of a dynamic node in another thread

2015-04-01 Thread Xia Baobao
By reading a book of OSG, finally, I kind of solved this problem. In my opinion, it is caused by the usage of DisplayList. OSG uses DisplayList by default, and it takes time for DisplayList to be compiled. If I use VBO or naive OpenGL rendering, problem is solved. I can use

Re: [osg-users] How to make the change of a dynamic node in another thread

2015-03-27 Thread Xia Baobao
My Code --- Code: int times = 0; int times_on_rendering = 0; osg::ref_ptrosg::Geode new_geode = NULL; class ReplaceGeode : public osg::NodeCallback { virtual void operator()( osg::Node* node, osg::NodeVisitor* nv ) { /*

Re: [osg-users] How to make the change of a dynamic node in another thread

2015-03-27 Thread Xia Baobao
Thank you. I didn't expect such detailed answer. ( It has been 2 months since the post. Sorry about replying such late. I have to do some other things for a while. ) I have tried getBound(), but it doesn't work for me. From your description, it seems getBound() is what I am looking for. I will

[osg-users] How to make the change of a dynamic node in another thread

2015-01-14 Thread Xia Baobao
I want to implement a dynamic node. Actually, it is a terrain, changing with time. The calculation costs a lot, which cannot be done in one frame. My silly attempts are as follows: At first, I tried to change vertices in an UpdateCallback, with the whole change done per frame. Of course this