Fixed read shader to safer ref version

This commit is contained in:
Robert Osfield 2018-03-24 11:23:59 +00:00
parent 640e7bc06c
commit 1930d9c345

View File

@ -116,7 +116,7 @@ int main(int argc, char** argv)
std::string 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());
}