This works nice so far, but comes with a number of problems:
- It's quite inflexible, e.g. dynamically resizing a dialog window
including child windows is difficult.
- As a result of scaling, many elements look blurry, e.g. the mouse
pointer, text, graphics.
- It is not possible to refer to physical pixels, i.e. have pixel-
accurate graphics.
Some of these issues have been discussed at
http://www.cafu.de/forum/viewtopic.php?f=8&t=985, where I have also
proposed a partial solution (introducing units), and some have been
addressed in #110.
However, it seems that this problem should be solved more universally.
'''''Key idea:'''''
A native desktop application (that is implemented with wxWidgets)
specifies its window dimensions in pixels of the physically available
desktop resolution. [http://docs.wxwidgets.org/trunk/classwx_sizer.html
wxSizer]s are used to layout windows relatively and dynamically.
The proposal of this ticket is to change the Cafu Gui System to
- use physical pixels as units (3D GUIs would continue to use a virtual
screen with a virtual resolution),
- use a `wxSizer`-like concept to layout its windows,
- scale fonts and graphics accordingly,
in order to achieve both pixel-perfect graphics and more flexibility in
window layout.
--
Ticket URL: <http://trac.cafu.de/ticket/112>
Cafu 3D Game and Graphics Engine <http://www.cafu.de>
The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action.