From c02ae8269ca8c93a8b9683d65e534239222f62a9 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 12 Apr 2006 22:56:26 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc_samples/; revision=9858 --- checkin_notes | 5 ++++- uppercase/uc_graphics.C | 2 ++ uppercase/upper_case.C | 7 ++++--- win_build/upper_case.vcproj | 3 +++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index e76c2fbb80..42071ebc99 100644 --- a/checkin_notes +++ b/checkin_notes @@ -23,4 +23,7 @@ David 12 Apr 2006 - split out graphics code into separate file uppercase/ - uc_graphics.C + uc_graphics.C (new) + upper_case.C + win_build/ + upper_case.vcproj diff --git a/uppercase/uc_graphics.C b/uppercase/uc_graphics.C index 05e2bb3e99..316b65caee 100644 --- a/uppercase/uc_graphics.C +++ b/uppercase/uc_graphics.C @@ -25,6 +25,7 @@ float white[4] = {1., 1., 1., 1.}; TEXTURE_DESC logo; int width, height; +APP_INIT_DATA uc_aid; static void initlights() { GLfloat ambient[] = {1., 1., 1., 1.0}; @@ -36,6 +37,7 @@ static void initlights() { } void app_graphics_init() { + boinc_get_init_data(uc_aid); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); txf_load_fonts("."); logo.load_image_file("logo.jpg"); diff --git a/uppercase/upper_case.C b/uppercase/upper_case.C index a30af1ec9c..2f6ed41692 100755 --- a/uppercase/upper_case.C +++ b/uppercase/upper_case.C @@ -43,6 +43,10 @@ #define BOINC_APP_GRAPHICS +#ifdef BOINC_APP_GRAPHICS +#include "graphics_api.h" +#endif + #include "diagnostics.h" #include "util.h" #include "filesys.h" @@ -59,7 +63,6 @@ bool run_slow; bool raise_signal; bool random_exit; double cpu_time=20; -APP_INIT_DATA uc_aid; int do_checkpoint(MFILE& mf, int nchars) { int retval; @@ -113,8 +116,6 @@ void worker() { MFILE out; FILE* state, *in; - boinc_get_init_data(uc_aid); - boinc_resolve_filename(INPUT_FILENAME, resolved_name, sizeof(resolved_name)); in = boinc_fopen(resolved_name, "r"); if (in == NULL) { diff --git a/win_build/upper_case.vcproj b/win_build/upper_case.vcproj index 2b897f9237..dce1844d16 100644 --- a/win_build/upper_case.vcproj +++ b/win_build/upper_case.vcproj @@ -155,6 +155,9 @@ + +