Hi Kim, First up, congrats on the release :-)
On Tue, Jun 16, 2009 at 9:45 AM, Kim C Bale<[email protected]> wrote: >> Why it cannot change type of Shader? > > I notice you're using osg 2.9.3, I've tested osgOcean against 2.8. I suspect > that the registry in 2.9.3 can now differentiate between the shader > extensions .frag and .vert and assigns the shader type automatically. Perhaps > Robert could shout out on this one. Either way in osg2.8 at least that > doesn't cause the shader to fail but rather flag a warning. I'll try and dig > around in the osg 2.9.3 source to see if this is the case. The .glsl plugin does now set the shader type automatically based on whether the .frag or .vert extension is used. The code in question is (from src/osgPlugins/glsl/ReaderWriterGLSL.cpp: if (shader->getType() == osg::Shader::UNDEFINED) { // set type based on filename extension, where possible if (ext == "frag") shader->setType(osg::Shader::FRAGMENT); if (ext == "vert") shader->setType(osg::Shader::VERTEX); } I haven't merged this change into the OSG-2.8 branch, which is probably why you don't see the warning. It would be odd to load a .vert shader and then set it to be a FRAGMENT shader type so this suggests a bug lurking in osgOcean or the resources. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

