[SDL] progressive loading

Glenn Maynard g_sdl at zewt.org
Mon Feb 3 20:11:01 PST 2003


On Mon, Feb 03, 2003 at 06:27:13PM -0900, Ray Skoog wrote:
> I've actually seen a program that loads large non-tiled images 
> progressively and smoothly: gqview (I have version 1.2.1 and it seems to 
> do well).  I can scroll around smoothly inside 6400x3200 jpegs as they 
> load, on a 2.5 year old computer too.

However, if you have a game running at a solid 75 FPS, and you suddenly
spend 30ms seeking to disk to start reading data, and you do it in the
same thread the renderer, then you've skipped a few frames, which will
probably be noticable.  (Whether pushing it into a thread helps is
probably computer-dependent--IDE isn't very nice.)

Ultimately, you can always either preload all bgs, or (if memory is
too tight) preload PNG data into memory and decompress them on first
use.

(SDL_image will load from memory, but I don't think it'll do incremental
decompression.)

-- 
Glenn Maynard




More information about the SDL mailing list