FlameRainCaptain
|
I am currently working on a 3D system using MANY .PNG images as "textures" for walls, floors, characters and ceilings.
It is not true 3D, but it will make use of the VERGE layers and try to draw it all in 3D.
I have just started, but I was wondering, just to be on the safe side, would it be safe to load ALL the "texture" images at the same time? (I'm using V27. All the images are compressed.)
If you have any other tips that I may use, say so.
And thanks for help if you give any.
Thanks for comments too! :)
Posted on 2001-06-14 16:49:07
|
andy
|
I don't think it would cause too many problems.
What I would do, though, to keep the RAM footprint smaller, is reference count all the resources.
Keep all the images under the control of a central image controller which keeps track of which images are being used, and which can be destroyed.
Basically, you would 'ask' the controller for an image. The controller would first check to see if it's already loaded. If not, it loads it, and sets its reference counter to one. If it is already, it simply increments the reference counter.
Similarly, when you free it, you also go through the controller. The controller would simply decrement the reference counter, and delete the resource if the counter reached zero.
Hope that made sense. ;)
'Never confuse a single defeat with a final defeat.' -F. Scott Fitzgerald
Posted on 2001-06-17 20:05:09
|