[osg-users] Is it safethat I modify the scenegraph in an updateoperation of a viewer?

2015-01-09 Thread ttaw
Hi, all: I wonder if it's safe that I modify (add node or remove children) the scenegraph in a custom updateoperation of a viewer in any threading model of osg. This update operation is added to view by viewer-addUpdateOperation().If not, what's the recommend time of doing this? Thanks.

Re: [osg-users] Memory increasing when using rtt,any clues?

2014-11-25 Thread ttaw
is to look at the memory tracking tool you are looking at, it may well be giving you false positives. Robert. On 25 November 2014 at 03:59, ttaw wattha...@qq.com wrote: Hi, all: In my application, I set a rtt camera with a texture2d object attached whose size is 4096*4096, and then I

[osg-users] Memory increasing when using rtt,any clues?

2014-11-24 Thread ttaw
Hi, all: In my application, I set a rtt camera with a texture2d object attached whose size is 4096*4096, and then I called tex2d-getTextureObject(contextID) to obtain the texture. But as a result, the memory keeps increasing 60MB per second. It's an MFC program. I wonder if there's any point

[osg-users] Re?? how to get the real world coordinates(x, y,z) in shader

2014-07-09 Thread ttaw
05:49 PM To: osg-usersosg-users@lists.openscenegraph.org; Subject: Re: [osg-users] how to get the real world coordinates(x, y,z) in shader ttaw wrote: The world coord you mentioned is cooresponding to the earth view, but the world coord I calculate by osg::computeLocalToWorld function

Re: [osg-users] how to get the real world coordinates(x, y, z) in shader

2014-07-08 Thread ttaw
attachment. So @ttaw: the mentioned bugfix is an attachment of a post in the OSG forum. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60217#60217 ___ osg-users mailing list osg-users

Re: [osg-users] how to get the real world coordinates(x, y, z) in shader

2014-07-08 Thread ttaw
coordinates(x, y,z) in shader ttaw wrote: But the problem still exists: [/quote] This [quote=ttawthe position coordinate of the text node remains mag x00[/quote] is not a problem. That is simply the world coordinate corresponding to the of the view the viewer creates for the perspective

Re: [osg-users] how to get the real world coordinates(x, y, z) in shader

2014-07-06 Thread ttaw
I tested my compiler(VisualStudio2010sp1), and found that c++11 is not supported unfortunately.It seems that ... is the problem.Following is the output info: VOODOO=1: 1InitializeBuildStatus: 1 Debug\test111.unsuccessfulbuild?? Touch ?? 1ClCompile: 1 1.cpp

Re: [osg-users] how to get the real world coordinates(x, y, z) in shader

2014-07-05 Thread ttaw
To: osg-usersosg-users@lists.openscenegraph.org; Subject: Re: [osg-users] how to get the real world coordinates(x, y,z) in shader ttaw wrote: thanks.I see.I will post an attachment when i finish the sscce You got me wrong, no need anymore for you to provide code. I already fixed

[osg-users] Re?? how to get the real world coordinates(x, y,z) in shader

2014-07-05 Thread ttaw
world coordinates(x, y,z) in shader ttaw wrote: Really?I will have a test on your code when I'm ready next monday.Thank you so much:) You again got me wrong . The code I posted yet is not the bug fix itself, but just a test for C++11 support for your compiler. -- Read

[osg-users] Re?? how to get the real world coordinates(x, y,z) in shader

2014-07-04 Thread ttaw
thanks.I see.I will post an attachment when i finish the sscce.-- Original -- From: Solkar Graphicssol...@freenet.de Date: Fri, Jul 4, 2014 08:53 PM To: osg-usersosg-users@lists.openscenegraph.org; Subject: Re: [osg-users] how to get the real world coordinates(x,

[osg-users] Re?? how to get the real world coordinates(x, y,z) in shader

2014-07-03 Thread ttaw
) in shader ttaw wrote: No, the text node is parented to root,sibling with the earth node.I think if osg_ViewMatrixInverse is from eye position, the result could also be about -x00 because gl_ModelViewMatrix*vertex is between -1 and 1, after transforming to world coords, the value could

Re: [osg-users] how to get the real world coordinates(x, y, z) in shader

2014-07-03 Thread ttaw
ttaw wrote: No, the text node is parented to root,sibling with the earth node.I think if osg_ViewMatrixInverse is from eye position, the result could also be about -x00 because gl_ModelViewMatrix*vertex is between -1 and 1, after transforming to world coords, the value could be millions

[osg-users] how to get the real world coordinates(x, y, z) in shader

2014-07-02 Thread ttaw
Hi,all: I want to get world coordinates of vertices in shader. I used: osg_ViewMatrixInverse*(gl_ModelViewMatrix*vertex); But the result is wrong if the geode is a child of an HUD camera node which is in the scenegraph.It seems that the uniform osg_ViewMatrixInverse is not for the HUD

Re: [osg-users] how to get the real world coordinates(x, y, z) in shader

2014-07-02 Thread ttaw
-- Original -- From: Solkar Graphics;sol...@freenet.de; Date: Thu, Jul 3, 2014 00:45 AM To: osg-usersosg-users@lists.openscenegraph.org; Subject: Re: [osg-users] how to get the real world coordinates(x, y,z) in shader ttaw wrote: I want to get

Re: [osg-users] how to get the real world coordinates(x, y, z) in shader

2014-07-02 Thread ttaw
world coordinates(x, y,z) in shader ttaw wrote: Following is the symptoms: There's an earth node under scene root whose coordinates are between 500 and 700. And also an ortho-projecting HUD camera with width 1600 and height 900 is under root.Under the HUD camera, a geode with text

[osg-users] Re?? how to get view pointer from cullvistor

2014-07-01 Thread ttaw
. so: osg::View* view = cullvisitor-getRenderInfo().getView(); Robert. On 1 July 2014 02:52, ttaw wattha...@qq.com wrote: Hi, all: I'm trying to get view pointer in traverse function. I used: CullVisitor *cv = dynamic_castCullvsitor *(nv); cv-getCurrentCamera()-getView

[osg-users] ?????? how to get view pointer from cullvistor

2014-07-01 Thread ttaw
); ? ? ? ??p_sceneView-getViewMatrix() ? ? ? ?p_sceneView-getProjectionMatrix() ? cheers Learned osg six months 2014-07-01 9:52 GMT+08:00 ttaw wattha...@qq.com: Hi, all: ? I'm trying to get view pointer in traverse function. I used: CullVisitor *cv = dynamic_castCullvsitor *(nv); cv

[osg-users] how to get view pointer from cullvistor

2014-06-30 Thread ttaw
Hi, all: I'm trying to get view pointer in traverse function. I used: CullVisitor *cv = dynamic_castCullvsitor *(nv); cv-getCurrentCamera()-getView(); This wouldn't work if the current node is a child of a Camera node which is in the scenegraph.I'm wondering how to achieve this. Could

[osg-users] a bug with clipnode?

2014-06-12 Thread ttaw
Hi, everyone: In my opinion, the clip effect of a clipnode only affects its child nodes, and a new clipnode only uses its own clipplanes. But the fact seems different from this. In the following project, a clipnode with a cow is added to two parents, but only one cow is shown. How can I

Re: [osg-users] a bug with clipnode?

2014-06-12 Thread ttaw
-- Original -- From: ttaw;wattha...@qq.com; Date: Thu, Jun 12, 2014 06:25 PM To: osg-usersosg-users@lists.openscenegraph.org; Subject: [osg-users] a bug with clipnode? Hi, everyone: In my opinion, the clip effect of a clipnode only affects its child nodes

[osg-users] Re?? a bug with clipnode?

2014-06-12 Thread ttaw
by applying above different subgraphs, this however won't work one will take precidence. Robert. On 12 June 2014 11:25, ttaw wattha...@qq.com wrote: Hi, everyone: In my opinion, the clip effect of a clipnode only affects its child nodes, and a new clipnode only uses its own clipplanes. But the fact

Re: [osg-users] perhaps a bug in osg::impostor

2014-05-07 Thread ttaw
On 4 March 2014 12:17, ttaw wattha...@qq.com wrote: hello, everyone. I am an osg learner in China.Recently, when I read the source code of osg::Impostor class, something about multi-threading confused me a lot.That is, in the case of CULL_VISITOR of osg::Impostor::traverse, no mutex

Re: [osg-users] Rendering order of passes of multi-passed technique

2014-03-10 Thread ttaw
, while std::sort makes no such guarantee. Robert. On 9 March 2014 06:09, ttaw wattha...@qq.com wrote: As we know, there may be several passes used in osgFX::Technique. My question is whether different-passes-drawables would be rendered orderly as the passes are added into Technique

[osg-users] Rendering order of passes of multi-passed technique

2014-03-08 Thread ttaw
As we know, there may be several passes used in osgFX::Technique. My question is whether different-passes-drawables would be rendered orderly as the passes are added into Technique (pass 0 is rendered before pass 1). As I read the source code of the file RenderBin.cpp, I found that not

Re: [osg-users] Must I call setDataVariance(DYNAMIC) to a group node?

2014-03-06 Thread ttaw
It doesn't matter. As Robert says, the node's hint is used only in optimizing. From: Cary, Karl A. karl.a.c...@leidos.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Must I call setDataVariance(DYNAMIC) to a group node? Message-ID:

[osg-users] osg::ref_ptr thread safety

2014-03-06 Thread ttaw
From: Ulrich Hertlein u.hertl...@sandbox.de To: osg-users osg-users@lists.openscenegraph.org Subject: [osg-users] osg::ref_ptr thread safety Message-ID: 53179051.8020...@sandbox.de Content-Type: text/plain; charset=UTF-8 try m_resource.release(). -BEGIN PGP SIGNED MESSAGE- Hash: SHA256

Re: [osg-users] osg-users Digest, Vol 81, Issue 5

2014-03-05 Thread ttaw
-- On 4 March 2014 12:17, ttaw wattha...@qq.com wrote: hello, everyone. I am an osg learner in China.Recently, when I read the source code of osg::Impostor class, something about multi-threading confused me a lot.That is, in the case of CULL_VISITOR

[osg-users] Must I call setDataVariance(DYNAMIC) to a group node?

2014-03-05 Thread ttaw
There's a saying on internet that setDataVariance(DYNAMIC) must be called to a group node which is to be changed while updating. But in my opinion, it's unnecessary because the child drawable pointers and stateset pointers are saved in ReaderLeaf as a ref_ptr if

[osg-users] perhaps a bug in osg::impostor

2014-03-04 Thread ttaw
hello, everyone. I am an osg learner in China.Recently, when I read the source code of osg::Impostor class, something about multi-threading confused me a lot.That is, in the case of CULL_VISITOR of osg::Impostor::traverse, no mutex is used to protect the function createImpostorSprite

Re: [osg-users] perhaps a bug in osg::impostor

2014-03-04 Thread ttaw
It's osgSim::Impostor, not osg::Impostor.I am sorry. -- Original -- From: ttaw;wattha...@qq.com; Date: Tue, Mar 4, 2014 08:17 PM To: osg-usersosg-users@lists.openscenegraph.org; Subject: perhaps a bug in osg::impostor hello, everyone. I