View Full Version : RFC: Texture-based GUIs for different screen resolutions

08-31-2005, 06:51 AM
Assume an OpenGL application running full-screen, rendering a simple GUI of buttons, pictures and labels. Given a range of acceptable resolutions from 800x600 to 1600x1200, and acknowledging that screen sizes do not increase linearly with screen resolution, it's clear that a texture/raster-based GUI that looks good at 800x600 will not be appropiate for running at 1600x1200.

Some thoughts:

Putting borders around the GUI fixes relative positioning, but controls still look small and the GUI looks cramped. Stretching an asset set developed for 800x600 fixes relative positioning and control size, but everything appears pixellated. Providing a different asset set for every possible screen resolution is costly in both artist time and distribution size. And anyway, you can never predict every resolution people want to use. An aspect-ratio of 4:3 isn't guaranteed, not even among the most popular resolutions.
Does anyone have any sagely advice for overcoming this problem?

08-31-2005, 07:09 AM
One solution is to make different images, one for each resolution, or for most important ones. Then, depending on the resolution, use the appropriate texture. This will imply you load images whenever the user will change resolution. But I'm pretty sure users won't do that so often.

Hope that helps.

08-31-2005, 08:42 AM
Well, I put everything in [0..1] range and I can tell it looks pretty good. Altough not excellent as OS GUIs, it's still rather usable.
The main problem is with the 4:3 ratio. This makes things go really bad. I took some time to find a way to solve it but I still don't realize how it is possible to
1- keep the aspect ratio AND
2- keep correct window dimensions

Let's see if something interesting arises from this thread...