CD Covers How to use 5000 Surfaces, is it possible
Blitz3D Forums/Blitz3D Programming/CD Covers How to use 5000 Surfaces, is it possible
| ||
I have 5000 CD covers stored as JPEG's on my hard drive. I want to: 1. Create a quad for each CD 2. Load the CD Cover 3. Apply to Quad 4. Repeat for 5000 albums. I am creating a quad, with 1 surface for each album. I use "LoadTexture", and "EntityTexture" to texture the quad. After about 500 albums I am using 600MB of memory !!!!! Can anyone suggest a good method to do this. I was thinking of loading 16 covers (256x256 in size), creating one surface 2048x2048) and apply a single surface method for every 16 albums, or is they a way to get the memory down? Thanks for any help |
| ||
Why would you need all 5,000 in memory at once? You can't possibly see that many on screen at the same time so why not load them as they become 'visible' and discard the ones that aren't? |
| ||
did you use .DDS textures? |
| ||
Do as gfk suggests. You could even stream in textures that are getting close to being displayed. |
| ||
as GfK said..I see no purpose of loading them all at once..simply load in what you want to see.. |
| ||
Thanks for all the replies. Would you suggest doing something like this if "Is Entity In view" then if it does not have a surface create surface load texture and apply to surface else if it has a surface clear surface If the above is correct, how do you free up the memory used by the surface, will "ClearSurface" suffice Thanks |
| ||
First off decide how many sprites you want on screen at once. This is how many you will create. You will simple just texture each sprite with the correct textures. No need to free anything really :o) |