Making Wayland Game-friendly

Graham Cantin kamilion at gmail.com
Tue Nov 9 02:34:56 PST 2010


On Tue, Nov 9, 2010 at 2:16 AM, Luke Benstead <kazade at gmail.com> wrote:
> On 9 November 2010 10:14, Nikolai Kondrashov <spbnick at gmail.com> wrote:
>> On 11/09/2010 12:54 PM, Luke Benstead wrote:
>>> I do have another idea, but whether it would work in practice I'm not
>>> sure, so I'll just throw this out there. What if, instead of changing
>>> the native resolution, Wayland allocated an off-screen buffer of the
>>> requested resolution. As far as the app is concerned it's rendering to a
>>> fullscreen window at the requested res, but then Wayland scales the
>>> offscreen buffer and blits it to the screen. If the window loses focus
>>> then it's minimized. (I know we are sort of stumbling onto WM territory
>>> here, I'm not really sure how to handle that. Perhaps it doesn't need to
>>> be minimized just displayed non-fullscreen).
>>
>> Sorry, I misinterpreted your idea. I thought you were talking about
>> switching resolutions transparently for the application. However, the idea
>> of keeping the native LCD resolution seems to be very nice, yet supporting
>> real resolution switching might be needed anyway.
>>
>> Sincerely,
>> Nick
>
> Yeah, of course. I don't doubt that native resolutions switches will be
> required. But if temporary switches can be handled by rendering offscreen,
> and full resolutions switches happen in a similar style to xrandr, that at
> least removes the problems with the common cases.
>
> Luke.

Hm, I picked up my droid to play a little NES river city ransom a
second ago, when it hit me.

Modern emulators have LEGENDARY 2d shaders.

http://en.wikipedia.org/wiki/Pixel_art_scaling_algorithms#Super_2.C3.97SaI_and_Super_Eagle

http://vogons.zetafleet.com/files/setting_scalers_in_dbgl.png

Have a look at the dosbox source tree for a whole mess of GPL implementations.

http://dosbox.svn.sourceforge.net/viewvc/dosbox/dosbox/trunk/src/gui/

render_*

http://dosbox.svn.sourceforge.net/viewvc/dosbox/dosbox/trunk/src/gui/render_scalers.cpp?revision=3653&view=markup

I know there's some shader versions as well, I'll try and dig some up;
if anyone shows interest in getting high quality scalers directly in
wayland (which sounds like a *REALLY* good idea to me.)

2xSaI or Super Eagle scaling of any window to fullscreen would be pure
love for Ten-Foot-Interfaces on wayland. Wayland backend for MythTV?
:D

Suggested aspect ratio should also be passed; in case the user *asks*
to override it (Eg, yes, I really *do* want to scale that 4:3 to
widescreen. *click click... click... click click* Ahhh.)

-- 
[     Graham Cantin      ] | (408) 890-7463 - Google Voice FindME
"Never feel stupid for asking questions, feel stupid for ignoring answers."
[  System Administrator  ] | (XXX) XXX-XXXX xXXX - IT & Office PBX
"You're arrogant for thinking you can, ignorant for thinking you cannot."
[ RFSpot Mobile Services ] | (XXX) XXX-XXXX - Main Office Direct
"Asking questions is important,
because that's when intuition gets converted into inspiration."
[   NASA Ames Research   ] | Building 19, Moffett Field, CA
"As living spies we must recruit men who are intelligent but appear
to be stupid; who seem to be dull but are strong in heart; men who are
agile, vigorous, hardy, and brave; well-versed in lowly matters and able
to endure hunger, cold, filth, and humiliation." - Tu Mu (803-825)


More information about the wayland-devel mailing list