From 5e2bc9d74ba3595e2b6581c22a5523a2b05bb4c1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 31 Oct 2003 22:37:46 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2614 --- api/boinc_api.C | 28 +++- api/boinc_api.h | 1 + api/graphics_api.C | 8 +- api/graphics_api.h | 15 +- api/gutil.C | 28 +++- api/gutil.h | 31 +--- api/reduce.C | 29 ++-- api/reduce.h | 6 +- api/windows_opengl.C | 21 ++- checkin_notes | 340 ++++++++++++++++++++++++------------------ client/app.C | 92 ++++++++---- client/app.h | 3 + client/cs_scheduler.C | 1 + doc/graphics.png | Bin 0 -> 8813 bytes doc/graphics.sxd | Bin 0 -> 7477 bytes lib/app_ipc.C | 2 + lib/parse.C | 2 + lib/parse.h | 2 +- 18 files changed, 359 insertions(+), 250 deletions(-) create mode 100644 doc/graphics.png create mode 100644 doc/graphics.sxd diff --git a/api/boinc_api.C b/api/boinc_api.C index 2da988f529..f7a5feeddd 100644 --- a/api/boinc_api.C +++ b/api/boinc_api.C @@ -79,18 +79,13 @@ bool boinc_is_standalone() { return standalone; } -// read the INIT_DATA and FD_INIT files +// parse the init data file. +// This is done at startup, and also if a "reread prefs" message is received // -int boinc_init(bool standalone_ /* = false */) { +int boinc_parse_init_data_file() { FILE* f; int retval; -#ifdef _WIN32 - freopen(STDERR_FILE, "a", stderr); -#endif - - standalone = standalone_; - // If in standalone mode, use init files if they're there, // but don't demand that they exist // @@ -119,6 +114,23 @@ int boinc_init(bool standalone_ /* = false */) { return retval; } } + return 0; +} + +// read the INIT_DATA and FD_INIT files +// +int boinc_init(bool standalone_ /* = false */) { + FILE* f; + int retval; + +#ifdef _WIN32 + freopen(STDERR_FILE, "a", stderr); +#endif + + standalone = standalone_; + + retval = boinc_parse_init_data_file(); + if (retval) return retval; f = fopen(FD_INIT_FILE, "r"); if (f) { diff --git a/api/boinc_api.h b/api/boinc_api.h index c9af1da16d..dea7a2d704 100755 --- a/api/boinc_api.h +++ b/api/boinc_api.h @@ -55,6 +55,7 @@ public: }; int boinc_init(bool standalone = false); +int boinc_parse_init_data_file(); int boinc_get_init_data(APP_INIT_DATA&); int boinc_finish(int); int boinc_resolve_filename(const char*, char*, int len); diff --git a/api/graphics_api.C b/api/graphics_api.C index 825edeb808..c2a654d99d 100755 --- a/api/graphics_api.C +++ b/api/graphics_api.C @@ -56,7 +56,7 @@ HANDLE hQuitEvent; GRAPHICS_INFO gi; bool graphics_inited = false; -int boinc_init_opengl() { +int boinc_init_graphics() { #ifdef HAVE_GL_LIB FILE* f; int retval; @@ -149,7 +149,7 @@ int boinc_init_opengl() { return !graphics_inited; } -int boinc_finish_opengl() { +int boinc_finish_graphics() { #ifdef _WIN32 if (graphics_inited) { win_loop_done = TRUE; @@ -205,7 +205,7 @@ bool throttled_app_render(int x, int y, double t) { if (boinc_max_gfx_cpu_frac) { boinc_cpu_time(t0, m); } - app_render(x, y, t); + app_graphics_render(x, y, t); if (boinc_max_gfx_cpu_frac) { boinc_cpu_time(t1, m); total_render_time += t1 - t0; @@ -257,7 +257,7 @@ GLenum ReSizeGLScene(GLsizei width, GLsizei height) { err = glGetError(); if (err) return err; - app_resize(width,height); + app_graphics_resize(width,height); return GL_NO_ERROR; } #endif diff --git a/api/graphics_api.h b/api/graphics_api.h index 2c6637d352..c31089b7c8 100755 --- a/api/graphics_api.h +++ b/api/graphics_api.h @@ -73,8 +73,8 @@ #endif // The API (functions called by the app) -extern int boinc_init_opengl(); -extern int boinc_finish_opengl(); +extern int boinc_init_graphics(); +extern int boinc_finish_graphics(); #ifdef HAVE_GL_LIB extern GLvoid glPrint(GLuint font, const char *fmt, ...); @@ -82,9 +82,14 @@ extern GLvoid glPrint(GLuint font, const char *fmt, ...); // Functions that must be supplied by the app // -extern void app_render(int xs, int ys, double time_of_day); -extern void app_init_gl(); -extern void app_resize(int width, int height); +extern void app_graphics_render(int xs, int ys, double time_of_day); +extern void app_graphics_init(); + // called each time a window is opened; + // called in the graphics thread +extern void app_graphics_reread_prefs(); + // called when get REREAD_PREFS message from core client. + // called in the graphics thread +extern void app_graphics_resize(int width, int height); // Implementation stuff // diff --git a/api/gutil.C b/api/gutil.C index 02a4e62b00..07108ee71b 100755 --- a/api/gutil.C +++ b/api/gutil.C @@ -710,7 +710,7 @@ void MOVING_TEXT_PANEL::sort(MOVING_TEXT_PANEL* tp, int n) { qsort(tp, n, sizeof(MOVING_TEXT_PANEL), compare_tp); } -PROGRESS::PROGRESS( +void PROGRESS::init( GLfloat* p, GLfloat l, GLfloat r, GLfloat in, GLfloat* c, GLfloat* ic ) { memcpy(pos, p, sizeof(pos)); @@ -728,7 +728,7 @@ void PROGRESS::draw(float x) { drawCylinder(false, pos, len, rad); } -PROGRESS_2D::PROGRESS_2D( +void PROGRESS_2D::init( GLfloat* p, GLfloat l, GLfloat w, GLfloat in, GLfloat* c, GLfloat* ic ) { memcpy(pos, p, sizeof(pos)); @@ -780,7 +780,7 @@ void PROGRESS_2D::draw(float x) { //----------------- RIBBON_GRAPH --------------------- -RIBBON_GRAPH::RIBBON_GRAPH(float* p, float* s, float* c, float* tc, float ty) { +void RIBBON_GRAPH::init(float* p, float* s, float* c, float* tc, float ty) { memcpy(pos, p, sizeof(pos)); memcpy(size, s, sizeof(size)); memcpy(color, c, sizeof(color)); @@ -792,10 +792,10 @@ void RIBBON_GRAPH::set_pos(float* p) { memcpy(pos, p, sizeof(pos)); } -float yvec[] = {0., 1., 0.}; -float xvec[] = {1., 0., 0.}; -float xvecneg[] = {-1., 0., 0.}; -float zvec[] = {0, 0, 1}; +static float yvec[] = {0., 1., 0.}; +static float xvec[] = {1., 0., 0.}; +static float xvecneg[] = {-1., 0., 0.}; +static float zvec[] = {0, 0, 1}; // draw XZ rect from i to i+1, with height data[i] // @@ -927,7 +927,11 @@ void crossProd(float a[3], float b[3], float out[3]) normalize(out); } -//makes a list of stars that lie on cocentric circles (inefficient, most will be out of sight) +STARFIELD::STARFIELD() { + stars = NULL; +} + +// // void STARFIELD::build_stars(int sz, float sp) { float modelview[16]; @@ -940,6 +944,7 @@ void STARFIELD::build_stars(int sz, float sp) { speed=sp; size=sz; + if (stars) free(stars); stars = (STAR*)calloc(sizeof(STAR), size); if(get_matrix_invert(modelview)==false) @@ -1053,6 +1058,13 @@ void STARFIELD::replace_star(int i) { // ------------ TEXTURE STUFF -------------------- // +struct tImageJPG { + int rowSpan; + int sizeX; + int sizeY; + unsigned char *data; +}; + struct Vertex { float tu, tv; diff --git a/api/gutil.h b/api/gutil.h index 32b36e485e..8bb0d0c066 100755 --- a/api/gutil.h +++ b/api/gutil.h @@ -104,7 +104,7 @@ class PROGRESS { float len, rad, inner_rad; public: float pos[3]; - PROGRESS(float* pos, float len, float diam, float inner, float* c, float* ic); + void init(float* pos, float len, float diam, float inner, float* c, float* ic); void draw(float); }; @@ -115,7 +115,7 @@ class PROGRESS_2D { float pos[3]; public: void set_pos(float*); - PROGRESS_2D(float* pos, float len, float width, float inner_width, float* c, float* ic); + void init(float* pos, float len, float width, float inner_width, float* c, float* ic); void draw(float); }; @@ -134,7 +134,7 @@ class RIBBON_GRAPH { float pos[3]; public: void set_pos(float*); - RIBBON_GRAPH(float* pos, float* size, float* color, float* tick_color, float tick_yfrac=0.2); + void init(float* pos, float* size, float* color, float* tick_color, float tick_yfrac=0.2); void draw(float* data, int len, bool with_ticks=false); void add_tick(float x, int index); }; @@ -164,7 +164,7 @@ public: }; -// ----- STUFF RELATED TO STARFIELDS +// ----- STARFIELDS // #define COS_30 0.8720254037f #define XY_HEIGHT 1656.85f @@ -183,21 +183,15 @@ class STARFIELD { void replace_star(int); bool is_visible(int,double[16],double[16],int[4]); STAR* stars; -public: +public: + STARFIELD(); void build_stars(int, float); void update_stars(float); }; -// ----- STUFF RELATED TO TEXTURES AND IMAGES - -#if 0 -#define IMAGE_TYPE_JPG 0 -#define IMAGE_TYPE_PPM 1 -#define IMAGE_TYPE_BMP 2 -#define IMAGE_TYPE_TGA 3 -#endif +// ----- TEXTURES AND IMAGES #define ALIGN_BOTTOM 0 #define ALIGN_CENTER 1 @@ -216,17 +210,8 @@ struct TEXTURE_DESC { int CreateTextureTGA(char* strFileName); }; -struct tImageJPG { - int rowSpan; - int sizeX; - int sizeY; - unsigned char *data; -}; -extern tImageJPG *LoadJPG(const char *filename); - - -// ----- STUFF RELATED TO FONTS +// ----- FONTS // extern unsigned int listBase; extern unsigned int MyCreateFont(char *fontName, int Size,int weight); diff --git a/api/reduce.C b/api/reduce.C index 17285fc460..90991fffa5 100644 --- a/api/reduce.C +++ b/api/reduce.C @@ -43,7 +43,7 @@ void REDUCED_ARRAY::set_max_dims(int mx, int my) { // Prepare to receive a source array. // (sx, sy) are dimensions of source array // -void REDUCED_ARRAY::init(int sx, int sy) { +void REDUCED_ARRAY::init_data(int sx, int sy) { sdimx = sx; sdimy = sy; if (sdimx > rdimx_max) { @@ -80,8 +80,10 @@ void REDUCED_ARRAY::reset() { last_ry_count = 0; } -void REDUCED_ARRAY::init_draw(GRAPH_STYLE st, float* p, float* s, double h0, double dh, float trans, - char* xl,char* yl,char* zl) { +void REDUCED_ARRAY::init_display( + GRAPH_STYLE st, float* p, float* s, double h0, double dh, float trans, + char* xl, char* yl, char* zl +) { memcpy(draw_pos, p, sizeof(draw_pos)); memcpy(draw_size, s, sizeof(draw_size)); draw_deltax = draw_size[0]/rdimx; @@ -399,7 +401,7 @@ void REDUCED_ARRAY::draw_row_rect_x(int row) { */ // } glEnd(); - break; + break; case GRAPH_STYLE_SURFACE: glBegin(GL_TRIANGLE_STRIP); @@ -434,7 +436,7 @@ void REDUCED_ARRAY::draw_row_rect_x(int row) { } } glEnd(); - break; + break; case GRAPH_STYLE_WIREFRAME: glLineWidth(1.0f); z0 = draw_pos[2] + (draw_size[2]*row)/rdimy; @@ -473,7 +475,7 @@ void REDUCED_ARRAY::draw_row_rect_x(int row) { } glEnd(); glDisable(GL_LINE_SMOOTH); - break; + break; case GRAPH_STYLE_PLANES: z0 = draw_pos[2] + (draw_size[2]*row)/rdimy; z1 = z0+.14f; @@ -650,7 +652,8 @@ void REDUCED_ARRAY::draw_axis_labels() { void REDUCED_ARRAY::draw_axes() { - //float adj2=-.18f; + // comment?? + float adj2=0.0f;//-(draw_size[2]*1)/rdimy; float adj=0.0f; @@ -753,9 +756,8 @@ void REDUCED_ARRAY::draw_labels() { float wd=.015f; float l=1.0f; -// char* zlabel = "Time(sec)"; -// char* xlabel = "Frequency(HZ)"; -// char* plabel = "Power"; + + // what the hell are the following doing here?? char* zmax = "107.4"; char* zmin = "0"; @@ -796,14 +798,11 @@ void REDUCED_ARRAY::draw_labels() { //unscale modelview matrix double aspect_ratio = 4.0/3.0; - if ((double)h*aspect_ratio > (double)w) - { + if ((double)h*aspect_ratio > (double)w) { model[1]*=1.0f/(((double)w/aspect_ratio)/(double)h); model[5]*=1.0f/(((double)w/aspect_ratio)/(double)h); model[9]*=1.0f/(((double)w/aspect_ratio)/(double)h); - } - else - { + } else { model[0]*=1.0f/(((double)h*aspect_ratio)/(double)w); model[4]*=1.0f/(((double)h*aspect_ratio)/(double)w); model[8]*=1.0f/(((double)h*aspect_ratio)/(double)w); diff --git a/api/reduce.h b/api/reduce.h index 606bac4fe6..74eafbf1e5 100644 --- a/api/reduce.h +++ b/api/reduce.h @@ -64,8 +64,10 @@ public: REDUCED_ARRAY(); ~REDUCED_ARRAY(); - void init(int, int); - void init_draw(GRAPH_STYLE, float*, float*, double, double, float,char*,char*,char*); + void init_data(int, int); + void init_display( + GRAPH_STYLE, float*, float*, double, double, float, char*, char*, char* + ); void set_max_dims(int, int); void reduce_source_row(float*, float*); void add_source_row(float*); diff --git a/api/windows_opengl.C b/api/windows_opengl.C index 45ae494970..382899cfd5 100755 --- a/api/windows_opengl.C +++ b/api/windows_opengl.C @@ -163,13 +163,13 @@ void SetMode(int mode) { // do GL initialization every time, since we're creating a new window // InitGL(); - app_init_gl(); + app_graphics_init(); // tell the core client that we're entering new mode // if (app_client_shm) { - app_client_shm->send_graphics_mode_msg( - APP_CORE_GFX_SEG, current_graphics_mode + app_client_shm->send_graphics_msg( + APP_CORE_GFX_SEG, GRAPHICS_MSG_SET_MODE, current_graphics_mode ); } } @@ -182,7 +182,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, // Handle For This Window LPARAM lParam) // Additional Message Information { RECT rt; - int width, height, new_mode; + int width, height, new_mode, msg; static bool visible = true; switch(uMsg) { @@ -235,8 +235,17 @@ LRESULT CALLBACK WndProc( HWND hWnd, // Handle For This Window ReSizeGLScene(LOWORD(lParam),HIWORD(lParam)); return 0; case WM_TIMER: - if (app_client_shm && app_client_shm->get_graphics_mode_msg(CORE_APP_GFX_SEG, new_mode)) { - SetMode(new_mode); + if (app_client_shm) { + if (app_client_shm->get_graphics_msg(CORE_APP_GFX_SEG, msg, new_mode)) { + switch (msg) { + case GRAPHICS_MSG_SET_MODE: + SetMode(new_mode); + break; + case GRAPHICS_MSG_REREAD_PREFS: + app_graphics_reread_prefs(); + break; + } + } } if (!visible) return 0; if (current_graphics_mode == MODE_HIDE_GRAPHICS) return 0; diff --git a/checkin_notes b/checkin_notes index 7255638d57..efcf7648ea 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6537,34 +6537,34 @@ Karl 2003/10/02 configxml.py David Oct 4 2003 - - throttled_app_render() returns true iff it rendered anything. - This lets the caller do swapbuffers only if needed - - app_render() now returns void - - added functions that read graphics files (JPEG, PPM, BMP, TGA) - and create textures (moved from SETI@home) + - throttled_app_render() returns true iff it rendered anything. + This lets the caller do swapbuffers only if needed + - app_render() now returns void + - added functions that read graphics files (JPEG, PPM, BMP, TGA) + and create textures (moved from SETI@home) - api/ - graphics_api.C,h - gutil.C,h - windows_opengl.C - lib/ - xml_util.C + api/ + graphics_api.C,h + gutil.C,h + windows_opengl.C + lib/ + xml_util.C David Oct 6 2003 - - Created class MOVING_TEXT_PANEL (in boinc/api/gutil.h) - to do Astropulse-type text display - - Created class TEXTURE_DESC (same place) - to represent an OpenGL texture (including its ID and size). - - Modify draw_texture() to not change the aspect ratio of the picture; - it shrinks the image in one dimension or the other, and centers - it in the allotted space - - Add a GRAPH_DRAW_STYLE field to REDUCED_ARRAY - - Eliminate methods of REDUCED_ARRAY that take a style argument + - Created class MOVING_TEXT_PANEL (in boinc/api/gutil.h) + to do Astropulse-type text display + - Created class TEXTURE_DESC (same place) + to represent an OpenGL texture (including its ID and size). + - Modify draw_texture() to not change the aspect ratio of the picture; + it shrinks the image in one dimension or the other, and centers + it in the allotted space + - Add a GRAPH_DRAW_STYLE field to REDUCED_ARRAY + - Eliminate methods of REDUCED_ARRAY that take a style argument - api/ - graphics_api.C - gutil.C,h - reduce.C,h + api/ + graphics_api.C + gutil.C,h + reduce.C,h Karl 2003/10/06 - client release 2.04 @@ -6627,13 +6627,13 @@ Oliver Oct 8 2003 windows_opengl.c David Oct 8 2003 - - made draw, CreateTextureJPG etc. into member functions of TEXTURE_DESC - - added xalign, yalign args to TEXTURE_DESC::draw() - - attempted to turn off rendering when window is hidden (don't think I succeeded) + - made draw, CreateTextureJPG etc. into member functions of TEXTURE_DESC + - added xalign, yalign args to TEXTURE_DESC::draw() + - attempted to turn off rendering when window is hidden (don't think I succeeded) - api/ - gutil.C,h - windows_opengl.C + api/ + gutil.C,h + windows_opengl.C Oliver Oct 9 2003 - fixed error handling when jpeglib fails @@ -6662,11 +6662,11 @@ Karl 2003/10/08 transitioner.C David Oct 10 2003 - - made STARFIELD CLASS - - implement tickmarks for RIBBON_GRAPH + - made STARFIELD CLASS + - implement tickmarks for RIBBON_GRAPH - api/ - gutil.C,h + api/ + gutil.C,h David Oct 10 2003 - various web stuff @@ -6747,20 +6747,20 @@ Oliver Oct 13 2003 David Oct 14 2003 - - don't call boinc_finish_opengl() in boinc_finish()!! - - max frame rate and max graphics CPU are accessible to app - (via global variables boinc_max_fps and boinc_max_gfx_cpu_frac) - - in windows_opengl.C, moved InitGL() and app_init_gl() calls - from SetMode() to start of win_graphics_event_loop() - (just want to call these once, right?) - - in windows_opengl.C: if in standalone mode and get WM_CLOSE event, - actually exit (makes debugging easier). + - don't call boinc_finish_opengl() in boinc_finish()!! + - max frame rate and max graphics CPU are accessible to app + (via global variables boinc_max_fps and boinc_max_gfx_cpu_frac) + - in windows_opengl.C, moved InitGL() and app_init_gl() calls + from SetMode() to start of win_graphics_event_loop() + (just want to call these once, right?) + - in windows_opengl.C: if in standalone mode and get WM_CLOSE event, + actually exit (makes debugging easier). - api/ - boinc_api.C - graphics_api.C,h - gutil.C - windows_opengl.C + api/ + boinc_api.C + graphics_api.C,h + gutil.C + windows_opengl.C Oliver Oct 14 2003 - stars now draw in visible pyramid with original coordinate system @@ -6774,11 +6774,11 @@ Oliver Oct 14 2003 David Oct 14 2003 - extended MOVING_TEXT_PANEL interface to let you draw text on - particular line numbers, - and get the coords the start of a line number + particular line numbers, + and get the coords the start of a line number - api/ - gutil.C,h + api/ + gutil.C,h Karl 2003-10-14 - makefiles: @@ -6848,14 +6848,14 @@ David 16 Oct 2003 since it's included (and needed) in UNIX as well as Windows Oliver 16 Oct 2003 - - Implemented scaling factor to center objects - - Fixed starfields - - Right justified text + - Implemented scaling factor to center objects + - Fixed starfields + - Right justified text - api/ - graphics_api.C - gutil.C,h - windows_opengl.C + api/ + graphics_api.C + gutil.C,h + windows_opengl.C Karl 2003-10-16 - updated python database API with new workunit.userid field @@ -6939,9 +6939,9 @@ Karl 2003-10-19 wingui_mainwindow.cpp David 20 Oct 2003 - - fixed bug that prevented screensaver from launching core client + - fixed bug that prevented screensaver from launching core client - win_screensaver.cpp + win_screensaver.cpp Karl 2003-10-20 - BOINC client release 2.05 @@ -6972,12 +6972,12 @@ David 20 Oct 2003 David 20 Oct 2003 - - changed CPU benchmark code to store all times as doubles. - This might fix the "negative fpops/sec" bug + - changed CPU benchmark code to store all times as doubles. + This might fix the "negative fpops/sec" bug - client/ - cpu_benchmark.C - cs_benchmark.C + client/ + cpu_benchmark.C + cs_benchmark.C David 20 Oct 2003 - changed overflowing integer calculation in CPU checkpoint code. @@ -6999,34 +6999,34 @@ David 22 Oct 2003 cs_files.C David 22 Oct 2003 - - fixed bug that caused project disk usage to be reported as zero - - Added debugging printfs (enabled by #define DEBUG) + - fixed bug that caused project disk usage to be reported as zero + - Added debugging printfs (enabled by #define DEBUG) to wingui_mainwindow.cpp. These write to C:/temp/core.txt. - - In CMyApp::InitInstance(), changed 2nd arg of CreateMutex + - In CMyApp::InitInstance(), changed 2nd arg of CreateMutex from false to true. This matches "1 instance" code samples from web. - Thought it might fix startup bug - no. - - Added debugging printfs (enabled by #define DEBUG) into screensaver; - causes it to write info to C:/temp/boinc_scr.txt - - Removed CREATE_NO_WINDOW and IDLE_PRIORITY flags from - CreateProcess() call in screensaver. - These aren't listed in the MSDN man page; are they needed? - - slight change to startup logic in screensaver: - - send it a BOINC_SS_START message only if it's already running - (not needed if start it ourselves, since we give it -saver arg) - - don't wait for 3 seconds after starting it - - In the cmdline passed to the core client from screensaver, - make argv[0] the real path of the executable. - Thought this might fix startup bug - no. - - Change "start_saver" to "started_by_screensaver". Truth in advertising. + Thought it might fix startup bug - no. + - Added debugging printfs (enabled by #define DEBUG) into screensaver; + causes it to write info to C:/temp/boinc_scr.txt + - Removed CREATE_NO_WINDOW and IDLE_PRIORITY flags from + CreateProcess() call in screensaver. + These aren't listed in the MSDN man page; are they needed? + - slight change to startup logic in screensaver: + - send it a BOINC_SS_START message only if it's already running + (not needed if start it ourselves, since we give it -saver arg) + - don't wait for 3 seconds after starting it + - In the cmdline passed to the core client from screensaver, + make argv[0] the real path of the executable. + Thought this might fix startup bug - no. + - Change "start_saver" to "started_by_screensaver". Truth in advertising. - client/ - client_state.C,h - cs_cmdline.C - win/ - win_screensaver.cpp - wingui_mainwindow.cpp - lib/ - filesys.C + client/ + client_state.C,h + cs_cmdline.C + win/ + win_screensaver.cpp + wingui_mainwindow.cpp + lib/ + filesys.C David 24 Oct 2003 - complete Bob's addition of SETI@home "grandfather" fields to DB @@ -7043,7 +7043,7 @@ Oliver 24 Oct 2003 is created api/ - reduce.h,C + reduce.h,C David 24 Oct 2003 - db_dump generates valid XML @@ -7068,21 +7068,21 @@ Karl 2003-10-25 David 25 Oct 2003 - - removed code that caps backoff count at one - TODO: we still need to reexamine the backoff policy, - so that multiple file failures don't lead to huge backoffs - - moved OpenGL init calls from the start of the event loop - back to SetMode, undoing an earlier change. - Turns out the need to be in SetMode because it creates a new - window every time. - This should fix the bug that cause Astropulse to show no graphics. - TODO: make sure that when an application window is hidden, - no rendering work gets done. + - removed code that caps backoff count at one + TODO: we still need to reexamine the backoff policy, + so that multiple file failures don't lead to huge backoffs + - moved OpenGL init calls from the start of the event loop + back to SetMode, undoing an earlier change. + Turns out the need to be in SetMode because it creates a new + window every time. + This should fix the bug that cause Astropulse to show no graphics. + TODO: make sure that when an application window is hidden, + no rendering work gets done. - api/ - windows_opengl.C - client/ - scheduler_op.C + api/ + windows_opengl.C + client/ + scheduler_op.C Karl 2003-10-25 - updated_versions: don't be so verbose unless "-v" verbose command-line @@ -7098,36 +7098,36 @@ Karl 2003-10-25 tools.py David 27 Oct 2003 - - Parse project-specific prefs correctly (i.e. based on venue) - These prefs are read from account files. - Account files are read before the client state file is parsed. - This presented a problem because the host venue, - which is needed to decide which project prefs to use, - is kept in the client state file. - So I added a new function, parse_venue(), that gets the - host venue from the state file; this is done before parsing account files. - - Also added element to account file so that we can - display that correctly in message about project prefs + - Parse project-specific prefs correctly (i.e. based on venue) + These prefs are read from account files. + Account files are read before the client state file is parsed. + This presented a problem because the host venue, + which is needed to decide which project prefs to use, + is kept in the client state file. + So I added a new function, parse_venue(), that gets the + host venue from the state file; this is done before parsing account files. + - Also added element to account file so that we can + display that correctly in message about project prefs - api/ - windows_opengl.C - client/ - client_state.C,h - client_types.C - cs_statefile.C - pers_file_xfer.h - prefs.C + api/ + windows_opengl.C + client/ + client_state.C,h + client_types.C + cs_statefile.C + pers_file_xfer.h + prefs.C Oliver 27 Oct 2003 - - Fixed efficiency bugs in starfield - api/ - gutil.C,h + - Fixed efficiency bugs in starfield + api/ + gutil.C,h Eric K 27 Oct 2003 - - xml_indent() is now limited to a max of 40 spaces. + - xml_indent() is now limited to a max of 40 spaces. lib/ - xml_util.h + xml_util.h David 27 Oct 2003 - let users see list of all their results @@ -7197,16 +7197,16 @@ Oliver 29 Oct 2003 - fixed improperly scaled logos api/ - gutil.C,h - + gutil.C,h + David 28 Oct 2003 - - app library: don't access shared memory if it's not there - (should keep non-standalone version from crashing - when run in isolation) + - app library: don't access shared memory if it's not there + (should keep non-standalone version from crashing + when run in isolation) - api/ - windows_opengl.C + api/ + windows_opengl.C Karl 2003-10-29 - removed test_sanity check from configure @@ -7218,18 +7218,18 @@ Karl 2003-10-29 make_project David 30 Oct 2003 - - On call to CreateEvent() to make "event" object for - core client to ask app to quit (Windows) - changed ManualReset argument to false. - This fixes a bug where, after resetting a project, - all apps get quit signal immediately - - Change CLIENT_STATE::report_result_error() so that it - takes a format string and varargs + - On call to CreateEvent() to make "event" object for + core client to ask app to quit (Windows) + changed ManualReset argument to false. + This fixes a bug where, after resetting a project, + all apps get quit signal immediately + - Change CLIENT_STATE::report_result_error() so that it + takes a format string and varargs - client/ - app.C - client_state.C,h - pers_file_xfer.C + client/ + app.C + client_state.C,h + pers_file_xfer.C David 30 Oct 2003 - API writes to stderr if get quit request @@ -7267,3 +7267,51 @@ David 31 Oct 2003 prefs.php prefs_edit_action.php stats.php (new) + +David 31 Oct 2003 + - Added a mechanism allowing applications to change their graphics + "on the fly" in response to new project preferences: + - Added a new message type to the + core->app graphics segment + - When the graphics framework (windows_opengl.C) gets this message, + it calls an application function app_graphics_reread_prefs(). + This function can call boinc_parse_init_data_file() (see below) + to get the new prefs + - Core client: when get new project preferences, + write new init_data.xml files for all running apps, + and send them messages. + New functions: + ACTIVE_TASK::write_app_init_file() + ACTIVE_TASK::request_reread_prefs() + ACTIVE_TASK_SET::request_reread_prefs(PROJECT*) + - name changes: + old new + boinc_init_opengl boinc_init_graphics + boinc_finish_opengl boinc_finish_graphics + app_init_gl app_graphics_init + app_render app_graphics_render + app_resize app_graphics_resize + REDUCED_ARRAY::init init_data + REDUCED_ARRAY::init_draw init_display:$ + - changed graphics objects (PROGRESS, PROGRESS2D, RIBBON_GRAPH) + to use init() functions instead of constructor for setup; + changed STARFIELD::build_stars() so that it can be called repeatedly + - factored code to read init_data.xml into a new function + boinc_parse_init_data_file() + - moved tImageJPG out of the .h file - it's not interface + + api/ + boinc_api.C,h + graphics_api.C,h + gutil.C,h + reduce.C,h + windows_opengl.C + client/ + app.C,h + cs_scheduler.C + doc/ + graphics.sxd (new) + graphics.png (new) + lib/ + app_ipc.C + parse.C,h diff --git a/client/app.C b/client/app.C index 704a139607..2a1fe0d142 100644 --- a/client/app.C +++ b/client/app.C @@ -130,36 +130,10 @@ int ACTIVE_TASK::init(RESULT* rp) { return 0; } -// Start a task in a slot directory. -// This includes setting up soft links, -// passing preferences, and starting the process -// -// Current dir is top-level BOINC dir -// -int ACTIVE_TASK::start(bool first_time) { - char exec_name[256], file_path[256], link_path[256], buf[256], exec_path[256]; - unsigned int i; - FILE_REF file_ref; - FILE_INFO* fip; - int retval; - char init_data_path[256], graphics_data_path[256], fd_init_path[256]; +int ACTIVE_TASK::write_app_init_file(APP_INIT_DATA& aid) { FILE *f; - APP_INIT_DATA aid; - GRAPHICS_INFO gi; - - ScopeMessages scope_messages(log_messages, ClientMessages::DEBUG_TASK); - scope_messages.printf("ACTIVE_TASK::start(first_time=%d)\n", first_time); - - if (first_time) { - checkpoint_cpu_time = 0; - } - current_cpu_time = checkpoint_cpu_time; - starting_cpu_time = checkpoint_cpu_time; - fraction_done = 0; - - gi.xsize = 800; - gi.ysize = 600; - gi.refresh_period = 0.1; + char init_data_path[256]; + int retval; memset(&aid, 0, sizeof(aid)); @@ -167,11 +141,14 @@ int ACTIVE_TASK::start(bool first_time) { safe_strcpy(aid.user_name, wup->project->user_name); safe_strcpy(aid.team_name, wup->project->team_name); if (wup->project->project_specific_prefs) { +#if 0 extract_venue( wup->project->project_specific_prefs, gstate.host_venue, aid.app_preferences ); +#endif + strcpy(aid.app_preferences, wup->project->project_specific_prefs); } aid.user_total_credit = wup->project->user_total_credit; aid.user_expavg_credit = wup->project->user_expavg_credit; @@ -203,9 +180,43 @@ int ACTIVE_TASK::start(bool first_time) { #endif retval = write_init_data_file(f, aid); - if (retval) return retval; - fclose(f); + return retval; +} + +// Start a task in a slot directory. +// This includes setting up soft links, +// passing preferences, and starting the process +// +// Current dir is top-level BOINC dir +// +int ACTIVE_TASK::start(bool first_time) { + char exec_name[256], file_path[256], link_path[256], buf[256], exec_path[256]; + unsigned int i; + FILE_REF file_ref; + FILE_INFO* fip; + int retval; + char graphics_data_path[256], fd_init_path[256]; + FILE *f; + GRAPHICS_INFO gi; + APP_INIT_DATA aid; + + ScopeMessages scope_messages(log_messages, ClientMessages::DEBUG_TASK); + scope_messages.printf("ACTIVE_TASK::start(first_time=%d)\n", first_time); + + if (first_time) { + checkpoint_cpu_time = 0; + } + current_cpu_time = checkpoint_cpu_time; + starting_cpu_time = checkpoint_cpu_time; + fraction_done = 0; + + gi.xsize = 800; + gi.ysize = 600; + gi.refresh_period = 0.1; + + retval = write_app_init_file(aid); + if (retval) return retval; sprintf(graphics_data_path, "%s%s%s", slot_dir, PATH_SEPARATOR, GRAPHICS_DATA_FILE); f = fopen(graphics_data_path, "w"); @@ -798,10 +809,27 @@ bool ACTIVE_TASK::read_stderr_file() { return false; } -void ACTIVE_TASK::request_reread_prefs() { +int ACTIVE_TASK::request_reread_prefs() { + int retval; + APP_INIT_DATA aid; + + retval = write_app_init_file(aid); + if (retval) return retval; app_client_shm.send_graphics_msg( CORE_APP_GFX_SEG, GRAPHICS_MSG_REREAD_PREFS, 0 ); + return 0; +} + +void ACTIVE_TASK_SET::request_reread_prefs(PROJECT* project) { + unsigned int i; + ACTIVE_TASK* atp; + + for (i=0; iresult->project != project) continue; + atp->request_reread_prefs(); + } } void ACTIVE_TASK::request_graphics_mode(int mode) { diff --git a/client/app.h b/client/app.h index d79d21b4e2..603ef1c93e 100644 --- a/client/app.h +++ b/client/app.h @@ -99,6 +99,7 @@ public: int graphics_acked_mode; // most recent mode reported by app int graphics_mode_before_ss; // mode before last screensaver request void request_graphics_mode(int); + int request_reread_prefs(); void check_graphics_mode_ack(); ACTIVE_TASK(); @@ -121,6 +122,7 @@ public: double est_time_to_completion(); bool read_stderr_file(); bool supports_graphics(); + int write_app_init_file(APP_INIT_DATA&); int write(FILE*); int parse(FILE*, CLIENT_STATE*); @@ -155,6 +157,7 @@ public: void hide_apps(); void restore_apps(); void check_graphics_mode_ack(); + void request_reread_prefs(PROJECT*); int write(FILE*); int parse(FILE*, CLIENT_STATE*); diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index 541ae537ad..09b49fb998 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -468,6 +468,7 @@ int CLIENT_STATE::handle_scheduler_reply( strcpy(project->project_specific_prefs, sr.project_prefs_xml); retval = project->write_account_file(); if (retval) return retval; + active_tasks.request_reread_prefs(project); } } diff --git a/doc/graphics.png b/doc/graphics.png new file mode 100644 index 0000000000000000000000000000000000000000..089dea30be6f64be40b042c08ebdb683559cae60 GIT binary patch literal 8813 zcmcJURa_j)+U^Gk65M@ocL}b+Ex5b84sIa?cOBez3*8Z(; z?|r_Db8~LGx~8kEtLypK^S)gZrK&88hD?kM007YB<)qXB09aD!c{>s;001)&-0TGa zsNTs-z1Q@~In7mcZV<#BjPoFn_#uyA^hS;TeXbWG2SgCw6Ae#E%oE!y(N3BUkA*5k zxx5yqnp}L0TX~x%^d;zPiwWQ-;>|@}!uVE~@Z_-O-T6GxRMdK}WoSmY*_2899B9uO z>0$_U)+scJU*{9a5Jx&XopnIg8OG^kjJ@umvF&^*%yAOQf*QkT-B+tK95avWVC!ss zVGPSk8Rx5X{G}{fIN_RZVY8k~GJBOrh|mLIv0EQTWNV>knH_J9HKR=^G(xsU^o)fI zFDE}uGMg{@=unq8zS6of$L2Mrb9tYU+%tl5YczL&rc649NR6n|pA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M5 z2Csh`muSn(=z1m~-u9NpT*$`OI!){%Gtmi7J7A;8H=B979g={O&|vJmb%#y`7yzN%}L0k5C#Y|Dt4&7vED#;|XPZ5(>U9Y3}74Otv=8GWEO zP_!$S8(hnIee;oC&HUFdFDqZ{S=a1oN(eXXs?}R(h9|wQ=9phKFRMv>=P^CpC2>eJ zRxEe{y*)S(U)629JEV6i=mQ^id`ezl+sxb)plCLad#=#3fZW|oZ?Pnxp;(<=syIt} z;P6UcvCG0f-fF0kSP{nCZ?*eF*gzlw%N!T!sI{kIGO8R~zGgqVYa@T3!7WSV602Cpsyy@EGZto^cz z_LhAmNg8=u=?4k}7}ti8@ka(yfsc%M?X=fptR~YUUI2*l{Bvv=M?0mY@{&Y8EH0I* zIS)NO;|V6Kr(qDxU7$Ypv=DyQIT-Rh=-zr12Jf7QVjLTieR1?I*3erOo2auYSFqd0 zw1SUzM)SvOH-LSuZwq%;R`Ltrtl*X8(V$=7w^@aHt=z!N}1WVVYg=O*4 zTj)?3I6GA0OiL9VgB0yQXXsF7{)7Hs`MO`Ce=XmiH=36Tp1+71<8SGne=`0V)LdS8 z{zdYrQ0K4f&tH6({r?v7{Ke->@K*rzi|dz~f9}6ax8*O|Ci%M)^H0t{?RvRC|02m- c|6#Xksa`>Cbu_fAsNVzBlH{Xqd(qJT4;GpCS^xk5 literal 0 HcmV?d00001 diff --git a/lib/app_ipc.C b/lib/app_ipc.C index 5b60d3dd46..c567370625 100755 --- a/lib/app_ipc.C +++ b/lib/app_ipc.C @@ -33,6 +33,8 @@ char* xml_graphics_modes[5] = { "" }; +#define REREAD_PREFS_MSG "" + int write_init_data_file(FILE* f, APP_INIT_DATA& ai) { if (strlen(ai.app_name)) { fprintf(f, "%s\n", ai.app_name); diff --git a/lib/parse.C b/lib/parse.C index 2ad5e6bc33..e3308dce57 100644 --- a/lib/parse.C +++ b/lib/parse.C @@ -203,6 +203,7 @@ void replace_element(char* buf, char* start, char* end, char* replacement) { strcat(p, temp); } +#if 0 // if the given XML has an element of the form // // ... @@ -231,6 +232,7 @@ void extract_venue(const char* in, const char* venue_name, char* out) { } } } +#endif // copy a line from the given string. // kinda like fgets() when you're reading from a string diff --git a/lib/parse.h b/lib/parse.h index 847670627b..7a7450b4d6 100644 --- a/lib/parse.h +++ b/lib/parse.h @@ -37,7 +37,7 @@ extern int dup_element_contents(FILE* in, const char* end_tag, char** pp); extern int copy_element_contents(FILE* in, const char* end_tag, char* p, int len); extern int read_file_malloc(const char* pathname, char*& str); extern void replace_element(char* buf, char* start, char* end, char* replacement); -extern void extract_venue(const char* in, const char* venue_name, char* out); +//extern void extract_venue(const char* in, const char* venue_name, char* out); extern char* sgets(char* buf, int len, char* &in); extern bool extract_xml_record(const std::string &field, const char *tag, std::string &record);