Making Wayland Game-friendly

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


On Tue, Nov 9, 2010 at 1:54 AM, Luke Benstead <kazade at gmail.com> wrote:
>> > So, basically I'm hoping that Wayland can fix this issue by allowing a
>> > resolution change to be associated with a single window.
>>
>> Could you expound on how you think Wayland should behave in this
>> situation?
>>
>> Bryce
>
> I think basically, similar to windows. So, in the API call that sets the resolution, allow an optional parameter which takes the ID of the window. If the window does not have focus (or ceases to exist), restore the previous resolution. I don't really know how Wayland works so I can't really suggest much more than that.
>
> 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 if I'm talking rubbish, I only have basically knowledge of how this stuff works.
>
> Luke.

I second that blitting to fit behavior: LCDs like being driven in
their native resolution; and we can do much much nicer stretches with
shaders than the hardware scaler in some displays can.
Please consider this as an *upgrade* to windows' behavior.

IIRC, on win7, either modern nvidia or modern ati drivers (forget
which) have something similar to this; always keeping native
resolution output to the display and shader-scaling the framebuffer
resolution up.

--
[     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