[GD-General] Vector GUIs
Brought to you by:
vexxed72
From: Brian H. <ho...@py...> - 2003-04-05 00:25:59
|
So I've been thinking about this whole scalable GUI thing some= more, and the "obvious" solution is to do something like make the GUI= in some kind of vector language so that it can scale. This has a large number of advantages, and the biggest= disadvantage is that you can't do real nice pixel/raster effects such as the various filters available for Photoshop. Instead they'd have to= be described procedurally, which might be considered fairly= limiting. A combination of FreeType fonts coupled with vector GUI= descriptions would seem to allow a great degree of scalability while keeping things relatively sane for the artist. To develop the GUI you could use a standard vector drawing= package that exports to a parseable file format such as AI, EPS or SVG. = Then you either load the file directly or run it through a filter to= some local file format such as a Lua script. Since SVG is XML-based,= you can easily allow the artist to tag functions for the GUI= components by embedding a key, or you could simply cheese out and tag it as= part of the object ID. The most difficult part of the process that I can think of is actually rendering the GUI on modern hardware. Obviously pixel plotting is straight out, so you'd probably construct the GUI elements into textures and use those. My biggest concern is that= this can eat up a ton of texture space, especially if you have= alpha (precluding the use of 16-bit texture information). Take a situation where you have a 1280x1024 fullscreen= application, and your total GUI elements come up to an overdraw of 4x (a lot= of the GUI elemenst would presumably be in the form of dialog boxes,= etc. that are temporal). Assuming you wanted the entire GUI= cached, this could easily add up to a lot of texture memory consumed for= a high-res display. Obviously you could rasterize into temporary bitmaps and use liberal amounts of texture destruction, but that= still seems like a lot of overhead just for a GUI. The problem,= of course, being that since this is scalable, the higher your screen= resolution the more texture memory is consumed by your GUI= elements. Thoughts, comments and "you're smoking crack" comments= appreciated. Brian |