Source/ThirdParty/ANGLE/src/compiler/ShaderLang.cpp
ShHandle ShConstructCompiler(ShShaderType type, ShShaderSpec spec,
                             const ShBuiltInResources* resources)
{
    if (!InitThread())
        return 0;

    TShHandleBase* base = static_cast<TShHandleBase*>(ConstructCompiler(type, spec));
    TCompiler* compiler = base->getAsCompiler();
    if (compiler == 0)
        return 0;

    // Generate built-in symbol table.
    if (!compiler->Init(*resources)) {
        ShDestruct(base);
        return 0;
    }

    return reinterpret_cast<void*>(base);
}
//
// Driver calls these to create and destroy compiler objects.
//
Driver calls these to create and destroy compiler objects.
Driver calls these to create and destroy compiler objects .
ShHandle ShConstructCompiler(ShShaderType type, ShShaderSpec spec,
                             const ShBuiltInResources* resources)
{
    if (!InitThread())
        return 0;
    TShHandleBase* base = static_cast<TShHandleBase*>(ConstructCompiler(type, spec));
    TCompiler* compiler = base->getAsCompiler();
    if (compiler == 0)
        return 0;
    if (!compiler->Init(*resources)) {
        ShDestruct(base);
        return 0;
    }
    return reinterpret_cast<void*>(base);
}
ShHandle ShConstructCompiler ( ShShaderType type , ShShaderSpec spec , const ShBuiltInResources * resources ) { if ( ! InitThread ( ) ) return 0 ; TShHandleBase * base = static_cast < TShHandleBase * > ( ConstructCompiler ( type , spec ) ) ; TCompiler * compiler = base -> getAsCompiler ( ) ; if ( compiler == 0 ) return 0 ; if ( ! compiler -> Init ( * resources ) ) { ShDestruct ( base ) ; return 0 ; } return reinterpret_cast < void * > ( base ) ; }
Driver calls these to create and destroy compiler objects.
Driver calls these to create and destroy compiler objects .
// Generate built-in symbol table.