Commit Graph

2 Commits

Author SHA1 Message Date
Eric J. Korpela 7450ffd910 There was a problem using dynamic allocations (with new) in many of the
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
2005-02-11 02:15:20 +00:00
David Anderson 8d9317c11f *** empty log message ***
svn path=/trunk/boinc/; revision=4990
2005-01-03 20:35:32 +00:00