1
// Berkeley Open Infrastructure for Network Computing
2
// http://boinc.berkeley.edu
3
// Copyright (C) 2008 University of California
5
// This is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU Lesser General Public
7
// License as published by the Free Software Foundation;
8
// either version 2.1 of the License, or (at your option) any later version.
10
// This software is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
// See the GNU Lesser General Public License for more details.
15
// To view the GNU Lesser General Public License visit
16
// http://www.gnu.org/copyleft/lesser.html
17
// or write to the Free Software Foundation, Inc.,
18
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
// platform-independent part of graphics library
2
23
#include "app_ipc.h"
4
25
#include "boinc_api.h"
5
26
#include "graphics2.h"
8
double boinc_max_gfx_cpu_frac;
28
double boinc_max_fps = 30.;
29
double boinc_max_gfx_cpu_frac = 0.2;
30
// needs to be fairly low. Graphics apps run at normal priority,
31
// so they can prevent main app from getting any time
10
33
bool throttled_app_render(int x, int y, double t) {
11
34
static double total_render_time = 0;