ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rhd_glx1.c
(Generate patch)

Comparing ray/src/hd/rhd_glx1.c (file contents):
Revision 3.3 by schorsch, Thu Jan 1 11:21:55 2004 UTC vs.
Revision 3.8 by greg, Thu Sep 6 00:07:43 2012 UTC

# Line 11 | Line 11 | static const char      RCSid[] = "$Id$";
11   #include  <GL/glx.h>
12   #include  <GL/glu.h>
13  
14 + #include "platform.h"
15   #include "rhd_qtree.h"
16   #include "rhdriver.h"
17   #include "rhdisp.h"
# Line 60 | Line 61 | static const char      RCSid[] = "$Id$";
61  
62   struct driver   odev;                   /* global device driver structure */
63  
64 + TMstruct        *tmGlobal;              /* global tone-mapping structure */
65 +
66   char odev_args[64];                     /* command arguments */
67  
68   static XEvent  currentevent;            /* current event */
# Line 141 | Line 144 | dev_open(
144                                  &myprims[BLU][CIEX],&myprims[BLU][CIEY],
145                                  &myprims[WHT][CIEX],&myprims[WHT][CIEY]) >= 6)
146                  dpri = myprims;
147 <        if (tmInit(mytmflags(), dpri, gamval) == NULL)
147 >        tmGlobal = tmInit(mytmflags(), dpri, gamval);
148 >        if (tmGlobal == NULL)
149                  error(SYSTEM, "not enough memory in dev_open");
150                                          /* open window */
151          ourwinattr.background_pixel = ourblack;
# Line 210 | Line 214 | dev_close(void)                        /* close our display and free resour
214          XCloseDisplay(ourdisplay);
215          ourdisplay = NULL;
216          qtFreeLeaves();
217 <        tmDone(NULL);
217 >        tmDone(tmGlobal);
218          freecones();
219          odev.v.type = 0;
220          odev.hres = odev.vres = 0;
# Line 282 | Line 286 | dev_view(                      /* assign new driver view */
286  
287   extern void
288   dev_section(            /* add octree for geometry rendering */
289 <        char    *ofn
289 >        char    *gfn,
290 >        char    *pfn
291   )
292   {
293          /* unimplemented */
# Line 339 | Line 344 | dev_flush(void)                        /* flush output */
344  
345   extern void
346   dev_cone(               /* render a cone in view coordinates */
347 <        BYTE    rgb[3],
347 >        uby8    rgb[3],
348          FVECT   ip,
349          double  rad
350   )
# Line 479 | Line 484 | draw3dline(                    /* draw 3d line in world coordinates */
484   static void
485   draw_grids(void)                        /* draw holodeck section grids */
486   {
487 <        static BYTE     gridrgba[4] = {0x0, 0xff, 0xff, 0x00};
487 >        static uby8     gridrgba[4] = {0x0, 0xff, 0xff, 0x00};
488          double  xmin, xmax, ymin, ymax, zmin, zmax;
489          double  d;
490                                          /* can we even do it? */
# Line 551 | Line 556 | moveview(      /* move our view */
556                  VSUM(nv.vp, qtL.wp[li], odir, -1.);
557                  spinvector(nv.vdir, nv.vdir, nv.vup, d);
558          } else if (orb) {               /* orbit up/down */
559 <                fcross(v1, odir, nv.vup);
560 <                if (normalize(v1) == 0.)
559 >                if (geodesic(odir, odir, nv.vup,
560 >                                d=MOVDEG*PI/180.*orb, GEOD_RAD) == 0.0)
561                          return(0);
557                spinvector(odir, odir, v1, d=MOVDEG*PI/180.*orb);
562                  VSUM(nv.vp, qtL.wp[li], odir, -1.);
563 <                spinvector(nv.vdir, nv.vdir, v1, d);
563 >                geodesic(nv.vdir, nv.vdir, nv.vup, d, GEOD_RAD);
564          } else if (mov) {               /* move forward/backward */
565                  d = MOVPCT/100. * mov;
566                  VSUM(nv.vp, nv.vp, odir, d);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines