Skip to content
Permalink
Browse files

Fixed warnings

  • Loading branch information
robertosfield committed Jan 14, 2020
1 parent 2ca6c55 commit 4b857d9379b9b872e478e2dd3b9171065ca4edf4
@@ -1537,15 +1537,14 @@ convertShader(osg::Shader::Type osgShaderType,
return true;

// Create shader
osg::ref_ptr<osg::Shader> osgShader = new osg::Shader(osgShaderType);
osg::ref_ptr<osg::Shader> 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;
}

@@ -34,7 +34,7 @@ namespace deprecated_osg {
if (array->getBinding() == static_cast<osg::Array::Binding>(ab)) return; \
array->setBinding(static_cast<osg::Array::Binding>(ab));\
if (ab==3 /*osg::Geometry::BIND_PER_PRIMITIVE*/) _containsDeprecatedData = true; \
dirtyDisplayList();
dirtyGLObjects();


#define GET_BINDING(array) (array!=0 ? static_cast<AttributeBinding>(array->getBinding()) : BIND_OFF)
@@ -535,7 +535,7 @@ void OBJWriterNodeVisitor::processStateSet(osg::StateSet* ss)

if (mat || tex)
{
_materialMap.insert(std::make_pair(osg::ref_ptr<osg::StateSet>(ss), OBJMaterial(mat, tex, _outputTextureFiles, _options)));
_materialMap.insert(std::make_pair(osg::ref_ptr<osg::StateSet>(ss), OBJMaterial(mat, tex, _outputTextureFiles, _options.get())));
_fout << "usemtl " << _materialMap[ss].name << std::endl;
}

0 comments on commit 4b857d9

Please sign in to comment.
You can’t perform that action at this time.