Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Robert Osfield
On Thu, May 22, 2008 at 7:48 PM, Art Tevs [EMAIL PROTECTED] wrote: Hi Stephane, Stephane, try to put an empty shader program on the cow, just like this: cow-getOrCreateStateSet()-setAttribute(new osg::Program(), osg::StateAttribute::ON); I think this could help you. And if not then just

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread David Spilling
Stephane, Have you tried running with no optimizer? A while ago I dimly remember encountering something similar with the optimiser doing funny things with empty nodes that had state changes... Dave ___ osg-users mailing list

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Stephane Lamoliatte
: Have you tried, what I have proposed before? cheers, Art --- Stephane Lamoliatte [EMAIL PROTECTED] schrieb am Fr, 23.5.2008: Von: Stephane Lamoliatte [EMAIL PROTECTED] Betreff: Re: [osg-users] empty geode + shader + uniform = bug ? An: OpenSceneGraph Users osg-users

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Art Tevs
or similar technique, which osg currently don't provide. Best regards, Art --- Stephane Lamoliatte [EMAIL PROTECTED] schrieb am Fr, 23.5.2008: Von: Stephane Lamoliatte [EMAIL PROTECTED] Betreff: Re: [osg-users] empty geode + shader + uniform = bug ? An: [EMAIL PROTECTED], OpenSceneGraph Users

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Robert Osfield
On Fri, May 23, 2008 at 1:47 PM, Art Tevs [EMAIL PROTECTED] wrote: Hi Stephane, I was pretty sure that this would helps. This is a problem which I have already encountered long time ago during the development of osgPPU. The problem is that there exists an apply() method for StateAttributes

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Stephane Lamoliatte
Robert Osfield a écrit : As replied in previous posts, their is a whole mechanism in osg::State for managing state, there is no need for a disapply as this automatically comes part of the package. I'm not agree with you. I find the origin of the bug : There is a real problem : see my bug

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Stephane Lamoliatte
Woops, I forget to send the other buggy scene. Cheers, -- Lamoliatte Stephane Ingenieur RD R.S.A. Cosmos Z.I. de la Vaure - B.P.40 42290 Sorbiers, France Tél : +33 (0)4 77 53 30 48 Fax : +33 (0)4 77 53 38 61 Group { Group { StateSet { Uniform { name color

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Art Tevs
Hi Robert, Stephane sorry a lot of text As replied in previous posts, their is a whole mechanism in osg::State for managing state, there is no need for a disapply as this automatically comes part of the package. OK, maybe I have to read through the complete osg code again and again.

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Mike Weiblen
Hi, coming to this thread late, sorry if redundant. There occasionally creeps up a question about osg::Program state leakage, and I could have sworn it was fixed, but maybe not. Is the problem fixed adding an empty osg::Program at the very root of the scenegraph? Such state leakage seems due

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Mike Weiblen
right, but not a disapply so much as a pop of state to a baseline, and the problem is that baseline is currently undefined. So it seems the answer is to provide that missing baseline state in osg::State above the root, so that state popping properly restores. I wish I could create and submit the

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Robert Osfield
Hi Art, As I previous explain before the apply of the default setting is done by apply a default constructed StateAttribute, this applies to osg::Program just as it does any other StateAttribute. This default constructed StateAttribute is applied when all other entries of that specific type of

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-23 Thread Art Tevs
am Fr, 23.5.2008: Von: Robert Osfield [EMAIL PROTECTED] Betreff: Re: [osg-users] empty geode + shader + uniform = bug ? An: [EMAIL PROTECTED], OpenSceneGraph Users osg-users@lists.openscenegraph.org Datum: Freitag, 23. Mai 2008, 17:02 Hi Art, As I previous explain before the apply

[osg-users] empty geode + shader + uniform = bug ?

2008-05-22 Thread Stephane Lamoliatte
Hi Robert, OpenSceneGraph have a strange behavior when I set a shader and an uniform variable on the state set of a geode which have no drawable. I write a very simple osg scene file to show you my problem (see the attachment). I have a group which have 2 children : * a geode without any

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-22 Thread Robert Osfield
Hi Stephane, When I run osgviewer scene.osg I get a red cow, which looks correct. I'm using the SVN version of the OSG under 64bit Kubuntu 7.10 on a Quad core Intel chip with NVidia drivers/7800GT. Robert. On Thu, May 22, 2008 at 7:29 AM, Stephane Lamoliatte [EMAIL PROTECTED] wrote: Hi

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-22 Thread Stephane Lamoliatte
Hi Robert, I have a red cow too, but it is not correct ! I send to you a graphical view of the scene graph in the file. I put the shader on the state set of anEmptyGeode, and it is applied on the cow. It is not correct at all ! Robert Osfield a écrit : Hi Stephane, When I run osgviewer

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-22 Thread Stephane Lamoliatte
Hi Robert, There is another strange thing about this. If you run osgviewer scene.osg and you press the 's' key, you could see that the statistics are red. So, the shader is applied on the statistics too. Robert Osfield a écrit : Hi Stephane, When I run osgviewer scene.osg I get a

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-22 Thread Robert Osfield
Hi Stephane, Pressing 's' for stats reveals the problem too. Looks like state is leaking from the empty geode. This is certainly a bug, as to it's possible cause I can't answer. I'm afraid I can only juggle so many support items at one time so can't go chasing this bug right now. Robert. On

Re: [osg-users] empty geode + shader + uniform = bug ?

2008-05-22 Thread Art Tevs
--- Robert Osfield [EMAIL PROTECTED] schrieb am Do, 22.5.2008: Von: Robert Osfield [EMAIL PROTECTED] Betreff: Re: [osg-users] empty geode + shader + uniform = bug ? An: OpenSceneGraph Users osg-users@lists.openscenegraph.org Datum: Donnerstag, 22. Mai 2008, 18:02 Hi Stephane, Pressing 's