From: Wenyuan G. <guo...@gm...> - 2010-06-10 06:21:23
|
Hi Brendan, Actually, only SVG based sprites are cached in PNGs. If the sprites are loaded from PNGs, they are not affected at all. Cheers! Wenyuan On Thu, Jun 10, 2010 at 1:04 PM, Brendan Luchen <bm...@ri...> wrote: > Hey Wenyuan, > > > I have updated our Git repository, master branch with an improved version > of > > SVG sprite loader. It caches prerendered PNG versions of SVG sprites on > > harddisk, and I'm happy to report that it greatly improves the initial > > loading time as well as delay in switching between fullscreen and > windowed > > mode in-game! > > Cool! It looks like the image is always saved out to PNG, even if it > was just loaded from the same PNG file--is that correct? Might want to > do the save only if we just loaded from SVG. > > > to my surprise, tuxpaint has a function to save > > SDL surfaces into PNG format! So in my implementation I have "borrowed" > that > > function (after modifying it a bit to support alpha channel) and > > everything's fine :D! Maybe that part can eventually to be factored out > in > > the common? > > Yes, I think that would be a good idea. > > Cheers, > Brendan > |