On Thu, 2008-01-31 at 08:44 -0500, Jean-Sébastien Guay wrote: > Hello Roni, > > I don't have an error message, and the image is not black, I just get > > the same picture I would get without running shaders. > You say you don't get any error messages, but did you set > OSG_NOTIFY_LEVEL=DEBUG when running your app? Any GLSL compiler > warnings/errors will show up then.
As a side note, I wonder if Robert could be convinced to remove these messages: cull_draw() 0x805a808 end cull_draw() 0x805a808 ...from DEBUG or INFO level output, as I get about 6 zillion of them every second, making setting the notify level pretty useless. Am I the only one that sees this? > In my experience, the GLSL compilers are pretty picky, and even warnings > will force the pipeline back to fixed-function, which is what you're > seeing. So check that. > > Any ideas? Maybe a driver issue? Maybe the card doesn't support the > > shaders used in osg 2.2? > Apart from the above, a driver issue is always possible (if it's a new > machine, the first thing you should do is update your video card drivers!). > > A GeForce 7800 is by no means old, so most shaders should work fine on > it. I have a 7900 at home and it works fine. The things that are > supported by the 8800 and not by the 7900 are (in a nutshell) Shader > Model 4 and Geometry Shaders, but I doubt your trivial > "gl_FragColor=vec4(1,0,0,1)" shader uses any of that! :-) > > One thing I have sometimes seen is the shader being replaced by an empty > osg::Program lower down in the scene graph. The empty osg::Program will > effectively disable shaders and the subgraph will thus be rendered by > the fixed pipeline. One way to see if that's happening is to output your > scene graph to an .osg file and inspect it in a text editor. > > #include <osgDB/WriteFile> > > int main(int argc, char** argv) > { > osg::ref_ptr<osg::Group> root = new osg::Group; > //... build scene graph ... > osgDB::writeNodeFile(*root, "output.osg"); > // Make sure the write is the last thing you do before running the > viewer, so > // you're pretty sure you're writing the final scene graph to the file. > viewer.setSceneData(root.get()); > return viewer.run(); > } > > Good luck, > > J-S > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org