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 Thu, May 22, 2008 at 4:57 PM, Stephane Lamoliatte
<[EMAIL PROTECTED]> wrote:
> 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 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 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 drawable;
>>> * a proxy node which point to the "cow.osg" file.
>>>
>>> When I set a simple shader with an uniform variable on the state set of
>>> the
>>> geode, the shader is applied to the cow. (strange behavior)
>>> When I remove the uniform variable  (and hard code the value of the
>>> uniform
>>> variable to the shader), the shader is not applied to the cow. (standard
>>> behavior)
>>>
>>> So, do you have any idea to correct this bug ?
>>>
>>> Cheers,
>>>
>>> --
>>> Lamoliatte Stephane
>>> R&D Engineer
>>> 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 {
>>>  name "aGroup"
>>>  Geode {
>>>   name "anEmptyGeode"
>>>   StateSet {
>>>     Uniform {
>>>       name "color"
>>>       type vec3 1 FloatArray 3
>>>       {
>>>         1 0 0
>>>       }
>>>     }
>>>     Program {
>>>       num_shaders 1
>>>       Shader {
>>>         type FRAGMENT
>>>         code {
>>>           "uniform vec3 color;"
>>>           "void main() {"
>>>           "    gl_FragColor = vec4(color.rgb, 1.0);"
>>>           "}"
>>>         }
>>>       }
>>>     }
>>>   }
>>>   num_drawables 0
>>>  }
>>>
>>>  ProxyNode {
>>>   name "whatEverYouWant"
>>>   FileNameList {
>>>       cow.osg
>>>   }
>>>  }
>>> }
>>>
>>> _______________________________________________
>>> 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
>>
>>
>>
>>
>>
>
>
> --
> Lamoliatte Stephane
> Ingenieur R&D
>
> 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
>
> _______________________________________________
> 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

Reply via email to