Loading a large number of images all at once might be overloading your
memory capacity. Even if you can fit all of the images in main memory at
once, doing it this way does not scale very well. Google Earth does it this
way and it chokes hard when loading larger animations.
Remember that even if each of your images is 30K on disk, they are
uncompressed in memory after being loaded.

The better way is to just load images individually, use them to display,
then throw them away. The imagestream class can help with this. I don't have
any specific experience with this class but I imagine that it is similar to
what I do myself in my application.

The fastest path for loading lots of images is to compress the textures and
store them on disk in compressed format (that is, ive format). Then, when
you are loading images, no processing is needed to display the image. I use
this technique in my program, and it is very effective.

-Eric

On Thu, Jun 12, 2008 at 8:46 AM, Andrea Martini <[EMAIL PROTECTED]>
wrote:

> Hi guys,
> i'm using osg 1.2. I would like to load a lot of images (15000 jpeg files)
> in memory using an osg:image vector ( std::vector<osg::image>), but i
> receive something like a memory bug when i arrive to load the 400th image
> (if i load i.e. 380 images i have no problem).
> Initally i have supposed to load all images (30 kbyte for each image) in a
> std:vector<osg:image>. I have seen that osg:imagestream also exists. What is
> the difference between image and imagestream? where i can find more
> information on how to  use these classes? Is there a tutorial or example
> that explain how to use them? I have taken look on quicktime plugin, but
> both version and topic inside plugin (quick time plugin try to convert video
> streaming into image, my problem is to load a lot of images!) don't allow me
> to use it. Also, i have tought to use two separate threads one for image
> folder loading, and the second for visualize image, but visualization thread
> is two time faster then loading thread (and i have only a buffer of 400
> images available!).
> Any suggestion?
> Bye.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to