Fixed read shader to safer ref version

This commit is contained in:
Robert Osfield 2018-03-24 11:23:59 +00:00
parent 88b7526a83
commit 8ae8966177

View File

@ -116,7 +116,7 @@ int main(int argc, char** argv)
std::string shaderFilename; std::string shaderFilename;
while(arguments.read("--shader", shaderFilename)) while(arguments.read("--shader", shaderFilename))
{ {
osg::ref_ptr<osg::Shader> shader = osgDB::readShaderFile(shaderFilename); osg::ref_ptr<osg::Shader> shader = osgDB::readRefShaderFile(shaderFilename);
if (shader.valid()) uberProgram->addShader(shader.get()); if (shader.valid()) uberProgram->addShader(shader.get());
} }