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.
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
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org