Hey all,
I recently started using CEGUI, and find it works quite great when using imagesets.
However, I have several images that are really only ever rendered once per frame (or 0 times even).
Would it be better to simply increase the size of the imageset, potentially going well beyond 4096x4096, or to use separate textures for these 'special' cases?
And if the latter, how should I put that in my Falagard?
Thanks in advance,
Anasky
[Solved] How to handle unique images
Moderators: CEGUI MVP, CEGUI Team
[Solved] How to handle unique images
Last edited by Anasky on Wed Oct 04, 2017 20:38, edited 1 time in total.
Re: How to handle unique images
Whenever you want to display an image you will somehow have to store it in a texture and upload that onto the GPU. A CEGUI Imageset or rather a CEGUI Texture basically does all that.
I assume you don't just use the texture in a single frame, but 0-1 times per frame in a succession of frames. So you want to reuse it.
Typically it is best to combine small images in few large textures rather than have many seperate small textures.
You might not need Falagard, you can just set the image on one of the Widgets, preferrably on Generic/Image which displays nothing but the image itself.
If you want more info you will need to explain me what you wanna use the image for and maybe also show it so I get a better idea
I assume you don't just use the texture in a single frame, but 0-1 times per frame in a succession of frames. So you want to reuse it.
Typically it is best to combine small images in few large textures rather than have many seperate small textures.
You might not need Falagard, you can just set the image on one of the Widgets, preferrably on Generic/Image which displays nothing but the image itself.
If you want more info you will need to explain me what you wanna use the image for and maybe also show it so I get a better idea
CrazyEddie: "I don't like GUIs"
Re: How to handle unique images
I get that adding images to a single texture reduces the amount of overload texture loading gives.
I'd expect 4 images of 2048x2048 to work better than 1 image of 4096x4096 though, given the incremental size?
Currently I'm using the StaticImage LookNFeel copied from WindowsLook to display the image through the single imageset that I have, because I don't know how to make a second imageset.
(But do let me know if there's a better way to do this)
I'd expect 4 images of 2048x2048 to work better than 1 image of 4096x4096 though, given the incremental size?
Currently I'm using the StaticImage LookNFeel copied from WindowsLook to display the image through the single imageset that I have, because I don't know how to make a second imageset.
(But do let me know if there's a better way to do this)
- Attachments
-
- HealthBar1.png (40.2 KiB) Viewed 4377 times
Re: How to handle unique images
Use CEED to make new imagesets. It is super easy and a pretty perfect tool to do that.
Regarding performance: the best is to try it out, but my bet is that one 4096x4096 will be faster than 4 of 2048x2048. Again, best you try it out
Instead of StaticImage of any looknfeel you can just use Generic/Image as I said before. It performs better because it is simpler.
Regarding performance: the best is to try it out, but my bet is that one 4096x4096 will be faster than 4 of 2048x2048. Again, best you try it out
Instead of StaticImage of any looknfeel you can just use Generic/Image as I said before. It performs better because it is simpler.
CrazyEddie: "I don't like GUIs"
Re: How to handle unique images
I guess I'll have to try and find CEED in that case
As for Generic/Image, I get the following error when I try:
CEGUI_THROW(UnknownObjectException(
"A WindowFactory object, an alias, or mapping for '" + type +
"' Window objects is not registered with the system.\n\n"
"Have you forgotten to load a scheme using "
"CEGUI::SchemeManager::createFromFile(..)?"));
Should I load the Generic file separately?
EDIT: Apparently I should, thanks
As for Generic/Image, I get the following error when I try:
CEGUI_THROW(UnknownObjectException(
"A WindowFactory object, an alias, or mapping for '" + type +
"' Window objects is not registered with the system.\n\n"
"Have you forgotten to load a scheme using "
"CEGUI::SchemeManager::createFromFile(..)?"));
Should I load the Generic file separately?
EDIT: Apparently I should, thanks
Who is online
Users browsing this forum: No registered users and 28 guests