graphics classes. In many places the code was written assuming default values
of 0, especially for pointers and booleans. While that's true in the case of
a static instance with the default constructors, it not generally true with
dynamic allocation unless the default constructor is replaced. Therefore I've
added constructors in the following classes/structs: MOVING_TEXT_PANEL, COLOR,
PROGRESS, PROGRESS_2D, TEXTURE_DESC, REDUCED_ARRAY.
This will be a problem is any are used from C code unless the constructors
declarations are enclosed in "#ifdef __cplusplus" blocks.
There was also a problem that showed up under Windows when dynamic allocations
were used. app_graphics_resize() gets called before app_graphics_init(). This
usually results in a crash since classes haven't yet been constructed. To work
around this I've added a case for WM_CREATE in the WndProc() which calls
app_graphics_init. Under windows this will get passed before WM_SIZE does.
svn path=/trunk/boinc/; revision=5395
configuring itself for largefile support. On these systems largefile
support breaks C++ compiles by defining away many of the C standard library
routines that should reside in namespace std::. In order to get around
problem first we have to check the largefile support macros. Later we will
use the macro SAH_LARGEFILE_BREAKS_CXX to check for the breakage. If
if breakage is found LARGEFILE_BREAKS_CXX is defined in config.h. This
define is checked in std_fixes.h and the appropriate functions are defined
in order to solve the problem. (These functions were already in place)
Because these defines affect the behavior of standard library headers,
std_fixes.h is being included from config.h
-Added AM_CPPFLAGS, AM_CFLAGS, and AM_CXXFLAGS (for flags common to all
compiles) so they will be defined in all Makefile.am files.
-Put #ifdef _cplusplus around the C++ specific items in std_fixes.h so it
may be included from C source files.
svn path=/trunk/boinc/; revision=5375
(1) apps being suspended would call boinc_finish(nonzero) and
core client would treat this as app failure. Introduce
a new function boinc_exit() and call that instead.
(2) improvements to GUI build with wxWidgets
(3) improved X event handling loop now ensures that X window
is taken away when window killed.
svn path=/trunk/boinc/; revision=5142
couple of weeks to fix a number of bugs and problems in the
X-windows and/or Mac graphics event loop, and with lockfile
handling problems seen on a number of Unix file systems. A
brief summary of the changes is:
lockfile: replace calls to exit() by boinc_finish() + make
boinc_finish() remove the lockfile
graphics-eventloop: some re-structuring and simplification to
make handling of glut-exits/abort-signals more robust. Eric,
if you could test this under Solaris we'd be very grateful.
svn path=/trunk/boinc/; revision=5025
of gcc to try and force them to not complain with -Wall but to always
include this, I decided to take a simpler approach. All these strings
now have global linkage. To prevent namespace conflicts they all
have different names. For the record, the variable extension is a hash made of the first ten characters of the md5sum of the file path, eg:
md5hash=`boinc/api/x_opengl.C | md5sum | cut -c 1-10`
svn path=/trunk/boinc/; revision=4979
generated a SIGARBT. We now catch this signal. In the
graphics thread, this just restarts the graphics init process
(with some sleep(2)ing if needed to prevent a busy fail loop).
If the signal is caught in the main thread, we restore the old
signal handler then raise(SIGABRT).
David, note that when run standalone, killing the graphics
window does NOT kill the process. I think this is fine, but
it doesn't correspond to what the documentation says.
svn path=/trunk/boinc/; revision=4958
Darwin/Unix. It's only needed under Windows. Also warn user if
GLUT libraries missing, and then build only non-graphical client
side code.
svn path=/trunk/boinc/; revision=4954
When glutInit fails it prints a line (~100 chars) to stdout. If it does
this 60 times per hour, that's 6kB/hour. After ten hours it will overflow
the blob for stderr.
svn path=/trunk/boinc/; revision=4953
- In graphics_lib.h, this is for compatibility with pure C
applications.
- In graphics_impl.h, this would be needed EVEN if we were
never building app or library with anything other than C++.
It's because dlsym() can only work if you pass it a non-name
mangled symbol. Please see:
http://www.isotton.com/howtos/C++-dlopen-mini-HOWTO/C++-dlopen-mini-HOWTO.html
for futher edetail.
- Comments added to graphics_lib.C, better error message.
svn path=/trunk/boinc/; revision=4829
it. Please read comments in-line. I think the major
shortcoming is
that most (all?) apps will want to use 'handle' to resolve their
own functions to communicate data from worker to app graphics.
Perhaps we should provide an additional argument to
boinc_init_graphics_lib() for that purpose? At the right point,
after sucessful dlopen(), boinc_init_graphics_lib() will call
that user-supplied function (if not NULL) passing it handle.
On return boinc_init_graphics_lib() will then carry on and start
graphics.
It's fun working on a file that's not in Makefile. No guilt!
svn path=/trunk/boinc/; revision=4816
Fixed 'time to checkpoint' problem under Win32 with pure C code.
It turns out that MS VC++ up to version 4.2 defines bool as INT.
But more recent VC++ defines bool as CHAR. This broke
boinc_time_to_checkpoint() under Win32, when used within pure ANSI
C code, if you treated the return value as a bool. So this patch
defines bool as char if using C under recent MS compilers.
David, a better solution for API functions that should be
callable from C is to make them return 'int' not 'bool'.
Probably ditto for Fortran. Sigh.
svn path=/trunk/boinc/; revision=4767
- C extern statements so that 'API' header files can be included in C
programs as well as C++.
- Make install now only installs the header files needed for building
the external APIs.
svn path=/trunk/boinc/; revision=4755
under Mac OSX. Also make dist now works (make distcheck still
broken). Karl, since you were the last
person to fix up this mess, how about taking a look??
svn path=/trunk/boinc/; revision=4665