loading members at runtime 2004-02-28 - By Lucas Meijer
Back mantis wrote:
> Hi NC, > > Not sure on the real differences between filename swapping and > importfileinto, but for what it's worth, last year I made a terrain > viewing app that needed to load large external images on demand (to use > as 3D textures), and after much deliberation and testing I eventually > went the route of member.filename swapping. > > The images being loaded were very large jpg's ( up to 4000 * 4000 > pixels), which could consume up to 50 megs each while loaded, so my app > would load the image via filename swapping, create multiple smaller SW3D > textures from the large bitmap, then swap the member filename back to a > small 'dummy' linked bitmap, to force that very large castmember to > unload itself and thus free up RAM.
An alternative to consider might be pim's propsave xtra, if you only need to grab the externalbitmap to grab it's image to stuff into a texture. Who knows what kind of stuff goes on when you set the .filename, maybe much more memory is used to parse say your jpg file, or whatever file.. If you've got room to spare on your distribution medium, and am worried about runtime memory usage, propsave might be the way to go.
Bye, Lucas __ ____ ____ ____ ____ ____ ____ ____ ____ ____ Dir3d-l mailing list Dir3d-l@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l
|
|