Good catch, and good ideas.
On Tue, Oct 9, 2012 at 4:13 AM, Andreas Schiefer <[email protected] > wrote: > I just noticed a small bug in this patch that causes it to never > actually use the cached images. The condition for testing if a cached > version is available still looks for "name" in the dict. > > So the line > if name in self._cached_images: > should of course read > if str(self.path)+name in self._cached_images: > > With that change, it might be desirable to put the value of > "str(self.path)+name" into a variable before the "if", instead of > computing it twice (for checking and then getting/setting the cached > image). > > Additionally, for consistency reasons, I think we should add similar > changes to the texture() and animation() functions too, which also use > a cache. > > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
