#112: GUIs: pixel-accurate text and graphics

0 views
Skip to first unread message

Cafu Trac

unread,
Apr 11, 2012, 9:28:09 AM4/11/12
to cafu...@googlegroups.com
#112: GUIs: pixel-accurate text and graphics
-------------------------+--------------------------------------------------
Reporter: Carsten | Owner:
Type: enhancement | Status: new
Priority: high | Milestone:
Component: Libs | Version: svn-head
Keywords: | Platform:
-------------------------+--------------------------------------------------
The current GuiSys is defined as a virtual desktop of 640 x 480 pixels
that (in the 2D case) is (non-uniformly) scaled to the application window.
Window positions and sizes are specified in absolute coordinates in the
virtual desktop.

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.

Cafu Trac

unread,
Aug 14, 2014, 5:30:39 AM8/14/14
to cafu...@googlegroups.com
#112: GUIs: pixel-accurate text and graphics
--------------------------+----------------------
Reporter: Carsten | Owner:
Type: enhancement | Status: new
Priority: high | Milestone:
Component: Libs | Version: svn-head
Resolution: | Keywords:
Platform: |
--------------------------+----------------------

Comment (by Carsten):

Also see #111.

--
Ticket URL: <http://trac.cafu.de/ticket/112#comment:1>

Cafu Trac

unread,
Jul 21, 2015, 5:04:18 PM7/21/15
to cafu...@googlegroups.com
#112: GUIs: pixel-accurate text and graphics
--------------------------+----------------------
Reporter: Carsten | Owner:
Type: enhancement | Status: new
Priority: high | Milestone:
Component: Libs | Version: svn-head
Resolution: | Keywords:
Platform: |
--------------------------+----------------------

Comment (by Carsten):

Also consider:
- https://github.com/sp4cerat/Game-GUI
- linking to: http://voxels.blogspot.de/2015/07/opengl-game-gui-
widgets-with-source.html

--
Ticket URL: <http://trac.cafu.de/ticket/112#comment:2>

Cafu Trac

unread,
Jun 10, 2016, 3:21:18 AM6/10/16
to cafu...@googlegroups.com
#112: GUIs: pixel-accurate text and graphics
--------------------------+----------------------
Reporter: Carsten | Owner:
Type: enhancement | Status: new
Priority: high | Milestone:
Component: Libs | Version: svn-head
Resolution: | Keywords:
Platform: |
--------------------------+----------------------

Comment (by Carsten):

Also consider:

- http://tekui.neoscientists.org

--
Ticket URL: <http://trac.cafu.de/ticket/112#comment:3>
Reply all
Reply to author
Forward
0 new messages