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

Comparing ray/src/rt/preload.c (file contents):
Revision 2.10 by greg, Fri Feb 18 00:40:25 2011 UTC vs.
Revision 2.13 by greg, Fri Nov 8 17:11:42 2013 UTC

# Line 18 | Line 18 | static const char      RCSid[] = "$Id$";
18   #include "data.h"
19   #include "func.h"
20   #include "bsdf.h"
21 #include "paths.h"
21  
22  
23   /* KEEP THIS ROUTINE CONSISTENT WITH THE DIFFERENT OBJECT FUNCTIONS! */
24  
25  
26 < extern int
26 > int
27   load_os(                        /* load associated data for object */
28 <        register OBJREC *op
28 >        OBJREC  *op
29   )
30   {
31          DATARRAY  *dp;
33        SDData  *sd;
32  
33          switch (op->otype) {
34          case OBJ_FACE:          /* polygon */
# Line 106 | Line 104 | load_os(                       /* load associated data for object */
104                  if (op->oargs.nsargs < 6)
105                          goto sargerr;
106                  getfunc(op, 5, 0x1d, 1);
107 <                sd = SDgetCache(op->oargs.sarg[1]);
110 <                if (sd != NULL && !SDisLoaded(sd))
111 <                        SDloadFile(sd, getpath(op->oargs.sarg[1],
112 <                                                getrlibpath(), R_OK));
107 >                loadBSDF(op->oargs.sarg[1]);
108                  return(1);
109          case MAT_PDATA:         /* plastic BRDF data */
110          case MAT_MDATA:         /* metal BRDF data */
# Line 139 | Line 134 | sargerr:
134   }
135  
136  
137 < extern void
137 > void
138   preload_objs(void)              /* preload object data structures */
139   {
140 <        register OBJECT on;
140 >        OBJECT on;
141                                  /* note that nobjects may change during loop */
142          for (on = 0; on < nobjects; on++)
143                  load_os(objptr(on));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines