require_once("docutil.php"); page_head("The BOINC graphics API"); echo"
Applications can optionally generate graphics, which are displayed either in an application window, or in full-screen mode (screensaver).
If an application is able to generate graphics, it should call
void boinc_init_opengl();at the start and
void boinc_finish_opengl();at the end. It must also supply a function
bool app_render(int xs, ys, double time_of_day);which will be called periodically. This should make openGL calls to generate the current graphic. xs and ys are the X and Y sizes of the window, and time_of_day is the relative time in seconds. The function should return true if it actually drew anything. It can refer to the user name, CPU time etc. obtained from boinc_init().
Give example here
Applications that don't do graphics must also supply a dummy app_render to link with the API.
The following global variables control frame rate:
boinc_max_fps is an upper bound on the number of frames per second (default 30).
boinc_max_gfx_cpu_frac is an upper bound on the fraction of CPU time used for graphics (default 0.5). "; page_tail(); ?>