3.2. s3d_mainloop

#include <s3d.h>

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

takes a function as argument. it will loop this function until a quit-event is received. you can pass NULL if you have no function to be looped, but its better to sleep some time if you have nothing to do anyway to save cpu-time.


void mainloop()
{
    usleep(1000); // sleep 1 ms in every cycle
}
...

s3d_mainloop(mainloop());