Skip to content

Tips and Common Mistakes

Younguk Kim edited this page May 12, 2018 · 2 revisions

Models

Asynchronous Model Loading

Panda3D has BamCache to cache model files, shader files, etc. However, BamCache has global lock, which may cause blocking.

In Render Pipeline, some shaders are loaded with a little delay (~ 1 seconds). Therefore, in initializing duration, asynchronous loading for heavy model may block loading the shaders. And this blocks MainThread and causes the lag of rendering window.

This issue can be avoided using some tricks:

  1. Use LoaderOptions::LF_no_disk_cache for loader option. This is effective using Bam model file.
  2. Use do_method_later in initializing duration.
References
Clone this wiki locally