fullscreen support for games
Glynn Clements
glynn at gclements.plus.com
Mon Oct 24 05:03:02 PDT 2005
Andre Heynatz wrote:
> I want to know if it is possible for applications to take over the
> graphics hardware. I have tried to run a Windows game through Wine
> which is a few years old (Might & Magic VI). Running the game changes
> the screen resolution which is very nice, but an error message says
> that the game wants to have 16 bpp depth, whereas the desktop has 32
> bpp. I wonder if an application (in this case the Wine DirectX layer)
> can request a screen depth change.
No.
> The RandR X extension allows to change the resolution of a screen, but
> not the depth. I have read that this is not supported because toolkits
> have emulation code dealing with it.
It's not supported because other applications, having queried the
screen depth and pixel format, won't deal well with it suddenly
changing.
> Normally, I want to keep the
> depth I have set: 32 Bit. All windowed applications have to adapt to
> that. But running a game is a different matter: I wonder why the
> desktop resolution is changed at all for this use case. I only want to
> play a game which should take over the graphics hardware for the time
> I play. This means creating a new screen on the fly, suspending the
> desktop, and allow the game to take full advantage of the hardware. My
> desktop should not consume any CPU or graphics processing in the
> meantime. If I want to read my Emails, I expect the desktop back after
> pressing a hotkey combination like ALT-TAB. This combination should
> work all time and return to my 32 Bit high-res desktop, suspending the
> application screen and iconifying the application. After having read
> my Emails, I want to return to the game.
So start a second X server at 16 bpp and run the game on that.
> This I can do in Windows XP, but not yet with Linux/X11.
That's primarily becuase Linux/X11 developers are likely to consider
breaking existing X programs to be a problem, whereas Microsoft
considers it an opportunity to obtain revenue from upgrades.
> I think the following is needed to support the described scenario:
>
> - create a new screen on the fly
> - activate the screen exclusively, suspending other screens (eventually swapping them out to harddisk to provide full memory resources as well)
> - suspending the screen, getting back to the desktop (the first set of screens after login, which is special)
> - allow ALT-TAB hotkey which cannot be disabled
> - delete a screen
>
> This is written from a user's perspective. I would like to know what
> is possible now and what can be done to support this kind of desktop
> use which is common for home systems. I know that it is possible to
> start another X server, but this is not convenient for Joe User, and
> does consume more resources which eventually are not there.
Suspending the other programs isn't realistic. E.g. if they are
network clients, suspending them will likely cause connections to time
out.
Also, games often want to mess with global display state (e.g.
keyboard processing, mouse acceleration), so you probably want a
completely separate display rather than just a screen.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the xorg
mailing list