[reporter="nodrev", created="Sat, 24 Nov 2012 20:30:59 +0100"]
Original reporter: narwhals
http://www.ogre3d.org/forums/viewtopic.php?f=2&t=62139 [^]
PageProvider::unloadProceduralPage and PageProvider::unprepareProceduralPage are never called. To reproduce this, set up a paging scenario such as a paged terrain, then create a custom class that extends PageProvider and overrides the four functions with something simple such as a printf. You will notice that the load and prepare functions are called, but the unload and unprepare functions are not called at all. If you move in and out of range of the pages, you will notice them being loaded and unloaded multiple times, however only the load and prepare functions will be called.
This is quite a problem, as extending these events is the only safe way to determine when to unload resources when the page unloads. For example, I attempted to use this class to load and unload a collision mesh into a physics system whenever a terrain page is loaded or unloaded.
This bug is also present in 1.7
Original Mantis Ticket: http://www.ogre3d.org/mantis/view.php?id=485
该提问来源于开源项目:OGRECave/ogre