weixin_39595487 2020-11-30 00:55
浏览 0

[OGRE-55] PageProvider::unload/unprepareProceduralPage never called

[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

  • 写回答

5条回答 默认 最新

  • weixin_39595487 2020-11-30 00:55
    关注

    [author="nodrev", created="Tue, 12 Feb 2013 14:43:48 +0100"]

    I already felt on this problem long time ago, and found the source of the problem.
    Explanation post is located here: http://www.ogre3d.org/forums/viewtopic.php?f=4&t=69231&p=452534&hilit=paging#p452534

    评论

报告相同问题?