Asynchronous loading of fonts, textures, sound files


I know PandaLoader can load models asynchronously and with a few settings textures can be made load all in background, too.

But how about loading textures asynchronously explicit?
And how about fonts and sounds? I couldn’t find anything about that in the manual or in the API reference.




The best way to load textures robustly is to put them in an egg file (for instance with egg-texture-cards) and then load the egg file and extract the textures from it. I recommend this approach because it allows you to specify texture attributes such as mipmaps and texture modes, which you otherwise have to clumsily specify in code if you use just loadTexture(). It also allows you to use the easy callback approach to background loading.

Fonts and sounds don’t work the same way, but you can load these in a sub-thread that you create yourself if you really need them to be background loaded.