[sldev] Texture caching
guidoj at users.sourceforge.net
Tue Mar 20 14:32:27 PDT 2007
On Tuesday 20 March 2007 21:59, Jason Giglio hit keys in the following order:
> Dzonatas wrote:
> > Also, in your patch:
> > - if (num_entries * (S32)sizeof(Entry) != filesize)
> > +
> > + //make sure the file is a multiple of the Entry size
> > + if( filesize % (S32)sizeof(Entry) != 0)
> > No need for your comment, as I can read the code just fine. However, I
> > prefer the way you used the "%".
> Considering the file has nearly no comments right now, I figured
> anything was an improvement. The way the code was written before made
> it less obvious what it was doing anyway.
Multiplications are much faster than divisions, so I'd keep the code the way
it was and just add a little comment to explain what happens.
More information about the SLDev