convert much of the C API to function pointers for speed (mostly sensitive parts called every frame)