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 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 [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org_______________________________________________ osg-users mailing list [email protected] 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
<<inline: scene.jpg>>
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

