TheBuzzSaw wrote:
How do I properly apply IMG_Init()/IMG_Quit()?
Its does not cover it : http://www.libsdl.org/projects/SDL_image/docs/SDL_image_8.html------------------------
TheBuzzSaw wrote:
How do I properly apply IMG_Init()/IMG_Quit()?
Its does not cover it : http://www.libsdl.org/projects/SDL_image/docs/SDL_image_8.html------------------------
You call IMG_Init as described in the link posted above when starting your program, and call IMG_Quit when exiting your program to clean up resources.
If calling IMG_Init is not necessary for you, it’s probably due to support being built-in, as described by that link. The same may not always be true on other systems or builds of the library, however.
I designed IMG_Init. As you say, it’s not necessary, because there’s built-in support. What it does is keeps the image libraries from being unloaded and reloaded every time you load a new image, which can lead to a significant performance degradation if you’re loading a lot of them in a loop.________________________________
From: nfries88@yahoo.com (Nathaniel J Fries)
Subject: Re: [SDL] a few questions…
You call IMG_Init as described in the link posted above when starting your program, and call IMG_Quit when exiting your program to clean up resources.
If calling IMG_Init is not necessary for you, it’s probably due to support being built-in, as described by that link. The same may not always be true on other systems or builds of the library, however.
Actually I changed it so it never unloads the DLL unless you call
IMG_Quit(), so you always get the speed benefit.On Fri, Dec 4, 2009 at 1:20 PM, Mason Wheeler wrote:
I designed IMG_Init.? As you say, it’s not necessary, because there’s
built-in support.? What it does is keeps the image libraries from being
unloaded and reloaded every time you load a new image, which can lead to a
significant performance degradation if you’re loading a lot of them in a
loop.
From: nfries88
Subject: Re: [SDL] a few questions…You call IMG_Init as described in the link posted above when starting your
program, and call IMG_Quit when exiting your program to clean up resources.If calling IMG_Init is not necessary for you, it’s probably due to support
being built-in, as described by that link. The same may not always be true
on other systems or builds of the library, however.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC