Page 1 of 1

Boxed textures bad perf

Posted: Sun Jul 24, 2005 13:47
by IJs
I'm designing a GUI for our CEGUI-powered application, and i've came across various issues related to the textures. Here's one.

Controls like the editbox and combobox resize their texture to the height of the font. If you're using a theme with pixel-art-style textures (1 pixel borders) this becomes rather nasty, because the borders get resized and become blurred.
I know this is defined inside the theme dll (WindowsLook, TaharezLook). I solved this by using a 'box'-texture (TopLeft, Top, TopRight, Left, Middle, ..., Bottom, BottomRight) instead of the default way of doing it (Left, Middle, Right).
However, this affects the performance of the application. No horrible fps rates, but you can notice the difference between my theme demo and the taharez demo.
I suppose this is the right way to do it? Just making sure.

Re: Boxed textures bad perf

Posted: Mon Jul 25, 2005 18:20
by CrazyEddie
Your approach is pretty much correct if you do not want stretching. There will be a performance cost, since you are drawing nine images per widget instead of three - this is to be expected.