[SDL] Saving SDL-native images
tuxdev103 at gmail.com
Sun Jun 8 20:05:40 PDT 2008
I also agree that you generally shouldn't do this, except for a single
case. If you are running embedded (handheld) and have limited
physical memory, it's okay to MMAP the file and use
SDL_CreateSurfaceFrom so that you don't have the image living in both
RAM and ROM.
If it's just an optimization, remember the First Rule: Don't Do It.
Profile your code and see if it really is a problem. The way you
describe this particular optimization doesn't even win you much for
the cost, especially if the regular image loading code is fairly
efficient (as I suspect).
More information about the SDL