O'Reilly logo

Panda3D 1.6 Game Engine by Dave Mathews

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading a file multiple times

In the recent Time for Actions we loaded the cycle model twice. It wouldn't be unusual for us to assume that the cycle model has been loaded into memory twice now, but that isn't the case. Having all the information generated from the bam file in memory multiple times would be a waste, because we could instead just tell the program to use the information twice. Panda3D does this for us automatically when we load a file more than once. The second call to loader detects that cycle.bam has already been loaded once and uses the information already in memory to create the components for the new model. This only applies to the information that exists in the file. Panda3D also does this with other file types as well.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required