View Full Version : Managing 1000 textures(AlbumCovers)
I'm designing an application to play music files for Linux. I want it shows a coverflow, with my own effects. However, my problem is how to manage 100 textures form every cover as OpenGL texturebuffers. If aI use images of 256*256*4(RGBA)bytes, every one will use aproximally 0.2MB. If a list have 200 songs, they will use 40MB, but if I have a list of 1000 songs, it will take 200MB. Is there anyway to reduce this dimensions. I think 256 *256 is an ideal size for a cover. Any algorithm for mange all this collection?. The goal is 1000 covers.
05-06-2007, 02:58 PM
You could use texture compresion. With DXT1, the textures will take 8 times less memory then originally.
05-07-2007, 02:32 AM
You only nees 256x256 when you get close, you can manage these things and page as you need. I think you have to do that because 200 is on the large side in system memory.
I suggest you have small thumbnails available for a few hundred CDs and full images for a few tens of CDs. Make it flexible so people can conficure the number of preloaded thumbnails and the high resolution cache to suit their system useage.
Yes and texture compression is your friend as mentioned.
S3TC might be better supported on more OpenGL cards and about as good a choice as any for your purposes I'd guess.
It only moves the problem though, you should still implement the caching scheme. With 3D desktops etc your app may have to coexist with other texture resources and even (ultimately) render on the desktop in 3D?
It's where things are headed and your type of utility is a prime candidate for this kind of thing.
05-07-2007, 03:02 AM
let's say you use thumbnails, which you keep in main memory, and load the full image from hd when a thumbnail is clicked. then the memory needed by your app will grow over time, since the operating system will keep a once loaded image in the hd cache. ultimately, although your app only uses a few mb, main memory will nevertheless be consumed by the system's hd cache.
(yes i know, it is unlikely that someone will view all 1000 covers. but anyway...)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.