예제 #1
0
파일: Program.cpp 프로젝트: BodyViz/osg
static bool readShaders( osgDB::InputStream& is, osg::Program& attr )
{
    unsigned int size = is.readSize(); is >> is.BEGIN_BRACKET;
    for ( unsigned int i=0; i<size; ++i )
    {
        osg::Shader* shader = dynamic_cast<osg::Shader*>( is.readObject() );
        if ( shader ) attr.addShader( shader );
    }
    is >> is.END_BRACKET;
    return true;
}
예제 #2
0
파일: Program.cpp 프로젝트: yueying/osg
static bool readShaders( osgDB::InputStream& is, osg::Program& attr )
{
    unsigned int size = is.readSize(); is >> is.BEGIN_BRACKET;
    for ( unsigned int i=0; i<size; ++i )
    {
        osg::ref_ptr<osg::Shader> shader = is.readObjectOfType<osg::Shader>();
        if ( shader ) attr.addShader( shader );
    }
    is >> is.END_BRACKET;
    return true;
}