Toadcop wrote:I want to know what would be the best practise to load/load off (?) dynamicly alot of different icons. for example i have a game in which i have thousands of icons (for items, spell w/e) and i want to load them only if i need to.
This does not really pertain to CEGUI. Anyway, why not just use an icon-manager that manages icons based on how often they need to be rendered? Keep the icons that are rendered often in memory and load the others as-needed from disk, unload icons that are no longer referenced. Determine the number of icons you can afford to keep in memory using some heuristics (available memory, hd access speeds, etc).
the first problem is imageset as i understand it's a layer between image and cegui ? so if i would create icons separately i would need a imageset for every icon ? wouldn't it be "slow" and overhead in memory ? so i am searching for efficient way for handling alot of image data in CEGUI. (coulnd't find something similar)
You would not
need to have a separate Imageset for every icon. That is your decision to make as an end-user; use what fits your needs.
The purpose of Imagesets is to improve texture performance by improving locality of images; ie to decrease texture switching, loading/off-loading data from the gfx card, etc. Think of it like reducing cache-misses but for imagery. If instead you define Imagesets which only hold a single-image, then you are defeating their purpose; and so yes, in that case, you may be introducing
extra overhead. Would it be slow? That depends on the application.
Kulik has created a utility specifically for amalgimating images and generating a .imageset file for the collection. If you group your icons wisely, this could significantly improve your performance.
If on the other hand you want to maintain separate image data for each icon, or just want to avoid Imagesets, I would suggest looking into RTT (Render To Texture) techniques so that you can render whatever you want onto the texture associated with a window. You still need to define a single Imageset/Image for each rendered icon-area, but no more. There are already many, many threads on this in these forums.
Or you could probably go even further and implement your own window-renderer that bypasses Imagesets entirely.
Where did you search, and what did you search for, to only turn up ImageButtons? Have you looked at CEGUI::StaticImage? You can also define your own light-weight widgets fairly easily. Such topics already exist on this forum and elsewhere.
i don't know much about CEGUI but "if it's so", it's a huge backdraw of CEGUI system.
code is code. a library cannot accommodate everyone all of the time. and for a free, open-source library this is a pretty good one. sometimes you have to get your hands dirty
useful links are appreciated.
Unfortunately I do not have very many links for these topics off hand. However, I do know that if you take the time to search the available resources you can find information on everything I have mentioned.