import opengl.platform.*;

findGLFunction(Args, Return, ..names) {
    ..for (name in names) {
        var ptr = lookupGLFunction(name);
        if (not null?(ptr))
            return GLCodePointer[Args, Return](ptr);
    }
    return GLCodePointer[Args, Return](0);
}

