Exemplo n.º 1
0
Shader* osgDB::readShaderFile(const std::string& filename,const Options* options)
{
    ReaderWriter::ReadResult rr = Registry::instance()->readShader(filename,options);
    if (rr.validShader()) return rr.takeShader();
    if (rr.error()) OSG_WARN << rr.message() << std::endl;
    return NULL;
}
Exemplo n.º 2
0
osg::ref_ptr<osg::Shader> osgDB::readRefShaderFile(const std::string& filename,const ReaderWriter::Options* options)
{
    ReaderWriter::ReadResult rr = Registry::instance()->readShader(filename,options);
    if (rr.validShader()) return osg::ref_ptr<osg::Shader>(rr.getShader());
    if (rr.error()) notify(WARN) << rr.message() << std::endl;
    return NULL;
}