예제 #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;
}
예제 #2
0
파일: ReadFile.cpp 프로젝트: joevandyk/osg
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;
}