/***********************************************************************\ * Screensaver graphics for a generic BOINC application * * In BOINC v6 the graphics API was changed so that the graphics thread * becomes a separate program, which simlply runs the event loop * and displays the graphics. So in that case you need a main() program, * but as you can see it can be very simple. This example does not * include communication with the science application, which is done * via shared memory (see the next example for that). * * The graphics routines for rendering a frame, resizing a window, * or handling mouse and keyboard input, are all in another file. * * Eric Myers - 5 July 2008 * @(#) $Id: graphics_app.C,v 1.3 2011/09/26 23:58:54 myers Exp $ \***********************************************************************/ #ifdef _WIN32 // Stuff we only need on Windows: #include "boinc_win.h" //#include "util.h" // to parse_command_line(), boinc_sleep(), dtime()... //#include "str_util.h" // parse_command_line() #endif /* BOINC API */ #include "diagnostics.h" #include "boinc_api.h" //#include "filesys.h" /* version.h is only used to get BOINC version numbers */ #include "version.h" /* Graphics */ #ifdef BOINC_APP_GRAPHICS # if defined _WIN32 /* Windows */ # include # elif defined __APPLE_CC__ /* MacOS X */ # include # include # include # else /* Unix */ # include # endif # include "graphics2.h" /* General graphics API for BOINC */ #endif /** * Main program, which calls boinc_graphics_loop() to initialize * graphics and continuosusly render frames, using the same callback * functions as BOINC 5 */ int main(int argc, char** argv) { // Before initializing BOINC itself, intialize diagnostics. // This directs stderr to a file and turns on some other checks. // boinc_init_graphics_diagnostics(BOINC_DIAG_REDIRECTSTDERR| BOINC_DIAG_DUMPCALLSTACKENABLED| BOINC_DIAG_TRACETOSTDERR); //ORIG// boinc_init_graphics_diagnostics(BOINC_DIAG_DEFAULTS); // We pass argc and argv so that it can look for --fullscreen // command line argument. // boinc_graphics_loop(argc, argv); // We only get here if there was an error, so finish with diagnostic // output // boinc_finish_diag(); } //EOF//