diff --git a/src/osgPlugins/Inventor/ConvertFromInventor.cpp b/src/osgPlugins/Inventor/ConvertFromInventor.cpp index 5dffafc04..2cd565e64 100644 --- a/src/osgPlugins/Inventor/ConvertFromInventor.cpp +++ b/src/osgPlugins/Inventor/ConvertFromInventor.cpp @@ -1537,15 +1537,14 @@ convertShader(osg::Shader::Type osgShaderType, return true; // Create shader - osg::ref_ptr osgShader = new osg::Shader(osgShaderType); + osg::ref_ptr osgShader; if (ivShader->sourceType.getValue() == SoShaderObject::FILENAME) - osgShader->loadShaderSourceFromFile(ivShader->sourceProgram.getValue().getString()); + osgShader = osgDB::readRefShaderFile(osgShaderType, ivShader->sourceProgram.getValue().getString()); else if (ivShader->sourceType.getValue() == SoShaderObject::GLSL_PROGRAM) - osgShader->setShaderSource(ivShader->sourceProgram.getValue().getString()); + osgShader = new osg::Shader(osgShaderType, ivShader->sourceProgram.getValue().getString()); else { - OSG_WARN << NOTIFY_HEADER << "Can not convert " - << "shader. Unsupported shader language." << std::endl; + OSG_WARN << NOTIFY_HEADER << "Can not convert shader. Unsupported shader language." << std::endl; return false; } diff --git a/src/osgPlugins/Inventor/DeprecatedGeometry.h b/src/osgPlugins/Inventor/DeprecatedGeometry.h index 17e58c0ce..7bf335df2 100644 --- a/src/osgPlugins/Inventor/DeprecatedGeometry.h +++ b/src/osgPlugins/Inventor/DeprecatedGeometry.h @@ -34,7 +34,7 @@ namespace deprecated_osg { if (array->getBinding() == static_cast(ab)) return; \ array->setBinding(static_cast(ab));\ if (ab==3 /*osg::Geometry::BIND_PER_PRIMITIVE*/) _containsDeprecatedData = true; \ - dirtyDisplayList(); + dirtyGLObjects(); #define GET_BINDING(array) (array!=0 ? static_cast(array->getBinding()) : BIND_OFF) diff --git a/src/osgPlugins/obj/OBJWriterNodeVisitor.cpp b/src/osgPlugins/obj/OBJWriterNodeVisitor.cpp index 457d3c25a..593f63c79 100644 --- a/src/osgPlugins/obj/OBJWriterNodeVisitor.cpp +++ b/src/osgPlugins/obj/OBJWriterNodeVisitor.cpp @@ -536,7 +536,7 @@ void OBJWriterNodeVisitor::processStateSet(osg::StateSet* ss) if (mat || tex) { - _materialMap.insert(std::make_pair(osg::ref_ptr(ss), OBJMaterial(mat, tex, _outputTextureFiles, _options))); + _materialMap.insert(std::make_pair(osg::ref_ptr(ss), OBJMaterial(mat, tex, _outputTextureFiles, _options.get()))); _fout << "usemtl " << _materialMap[ss].name << std::endl; }