2.3.

#include 

int s3d_mainloop(void (*f)());