--- ray/src/hd/rhd_ogl.c 2004/01/01 11:21:55 3.24 +++ ray/src/hd/rhd_ogl.c 2005/01/07 20:33:02 3.26 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rhd_ogl.c,v 3.24 2004/01/01 11:21:55 schorsch Exp $"; +static const char RCSid[] = "$Id: rhd_ogl.c,v 3.26 2005/01/07 20:33:02 greg Exp $"; #endif /* * OpenGL driver for holodeck display. @@ -28,6 +28,7 @@ static const char RCSid[] = "$Id: rhd_ogl.c,v 3.24 200 #include "standard.h" #include "rhd_odraw.h" #include "rhdisp.h" +#include "paths.h" #ifdef DOBJ #include "rhdobj.h" #endif @@ -81,6 +82,8 @@ static const char RCSid[] = "$Id: rhd_ogl.c,v 3.24 200 struct driver odev; /* global device driver structure */ +TMstruct *tmGlobal; /* global tone-mapping structure */ + char odev_args[64]; /* command arguments */ static GLfloat *depthbuffer = NULL; /* depth buffer */ @@ -208,7 +211,8 @@ char *id; &myprims[BLU][CIEX],&myprims[BLU][CIEY], &myprims[WHT][CIEX],&myprims[WHT][CIEY]) >= 6) dpri = myprims; - if (tmInit(mytmflags(), dpri, gamval) == NULL) + tmGlobal = tmInit(mytmflags(), dpri, gamval); + if (tmGlobal == NULL) error(SYSTEM, "not enough memory in dev_open"); /* open window */ ourwinattr.background_pixel = ourblack; @@ -298,7 +302,7 @@ dev_close(void) /* close our display and free resour gwind = 0; XCloseDisplay(ourdisplay); ourdisplay = NULL; - tmDone(NULL); + tmDone(tmGlobal); odev.v.type = 0; odev.hres = odev.vres = 0; odev.ifd = -1;