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

Comparing ray/src/common/readmesh.c (file contents):
Revision 2.10 by greg, Wed Oct 22 02:06:34 2003 UTC vs.
Revision 2.14 by greg, Wed Dec 15 17:26:28 2010 UTC

# Line 14 | Line 14 | static const char RCSid[] = "$Id$";
14   #include  "mesh.h"
15   #include  "resolu.h"
16  
17 + #ifdef getc_unlocked            /* avoid horrendous overhead of flockfile */
18 + #undef getc
19 + #define getc    getc_unlocked
20 + #endif
21 +
22   static char     *meshfn;        /* input file name */
23   static FILE     *meshfp;        /* mesh file pointer */
24   static int      objsize;        /* sizeof(OBJECT) from writer */
# Line 92 | Line 97 | gettree()                              /* get a pre-ordered octree */
97                  default:
98                          mesherror(USER, "damaged mesh octree");
99          }
100 <        return (OCTREE)NULL; /* pro forma return */
100 >        return (OCTREE)0;       /* pro forma return */
101   }
102  
103  
# Line 145 | Line 150 | register MESHPATCH     *pp;
150          } else
151                  pp->norm = NULL;
152          if (flags & MT_UV) {
153 <                pp->uv = (uint16 (*)[2])calloc(pp->nverts, 2*sizeof(uint16));
153 >                pp->uv = (uint32 (*)[2])calloc(pp->nverts, 2*sizeof(uint32));
154                  if (pp->uv == NULL)
155                          goto nomem;
156          } else
# Line 162 | Line 167 | register MESHPATCH     *pp;
167          if (flags & MT_UV)
168                  for (i = 0; i < pp->nverts; i++)
169                          for (j = 0; j < 2; j++)
170 <                                pp->uv[i][j] = mgetint(2);
170 >                                pp->uv[i][j] = mgetint(4);
171                                          /* local triangles */
172          pp->ntris = mgetint(2);
173          if (pp->ntris < 0 || pp->ntris > 512)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines