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.12 by greg, Thu Apr 29 14:36:49 2004 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 + #define getc    getc_unlocked
19 + #endif
20 +
21   static char     *meshfn;        /* input file name */
22   static FILE     *meshfp;        /* mesh file pointer */
23   static int      objsize;        /* sizeof(OBJECT) from writer */
# Line 145 | Line 149 | register MESHPATCH     *pp;
149          } else
150                  pp->norm = NULL;
151          if (flags & MT_UV) {
152 <                pp->uv = (uint16 (*)[2])calloc(pp->nverts, 2*sizeof(uint16));
152 >                pp->uv = (uint32 (*)[2])calloc(pp->nverts, 2*sizeof(uint32));
153                  if (pp->uv == NULL)
154                          goto nomem;
155          } else
# Line 162 | Line 166 | register MESHPATCH     *pp;
166          if (flags & MT_UV)
167                  for (i = 0; i < pp->nverts; i++)
168                          for (j = 0; j < 2; j++)
169 <                                pp->uv[i][j] = mgetint(2);
169 >                                pp->uv[i][j] = mgetint(4);
170                                          /* local triangles */
171          pp->ntris = mgetint(2);
172          if (pp->ntris < 0 || pp->ntris > 512)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines