[osg-users] osg::Switch node can't free memory
Robert Osfield
robert.osfield at gmail.com
Wed Jun 1 00:38:40 PDT 2016
Hi John,
On 1 June 2016 at 02:20, John Lee <357059570 at qq.com> wrote:
> I am so sorry. In my appliction, I can load a lot of ive models dynamically. When i load about 120 ive models, the memory usage is about 2.5G, and the frame rate about 25-35. Now I want to minimize the memory usage to optimize my application because the camra can't see all objects. Now i don't know how to begin.
> I don't know whether you understand. Thank you for your reading and answer.
Have a look archives/forum into discussions about osg::ProxyNode and
osg::PagedLOD as these are design for dynamic datasets. With PagedLOD
database you can scale comfortably up to multi-terrabyte databases and
still hit 60Hz. However, it does require you to build an appropriate
PagedLOD hierachy, something that is a more advanced topic.
The other approach is to reduce the size of the individual models you
are loading. You don't say anything about what form these models take
so I can't make any specific suggestions. General suggestions are use
compressed textures, use Vec4ubArray for per vertex colours instead of
Vec4fArray, simply the meshes, use
osg::Texture::setUnrefImageAfterApply(true).
Robert.
More information about the osg-users
mailing list