brian.paul at tungstengraphics.com
Mon Feb 5 08:07:09 PST 2007
David Reveman wrote:
> On Sun, 2007-02-04 at 12:13 -0800, Keith Packard wrote:
>> On Thu, 2007-02-01 at 18:26 -0500, David Reveman wrote:
>>> I spent some time this week trying to add support for input
>>> transformations to the server. I tried a few different approaches. The
>>> patches I've attached are what's currently working best for me.
>> Thanks for getting started on this; I believe this is the largest
>> remaining problem with a composited desktop.
>>> In this approach I allow every window to have it's own root window
>>> coordinate space. A window's root window coordinate space is affected by
>>> all it's ancestors. Composite clients can set a triangular mesh that
>>> maps root window coordinates from a composite window to one of its
>>> redirected child-windows. Event coordinates are generated in the event
>>> windows root coordinate space.
>> I was thinking we'd want a quad mesh instead of a tri mesh so we could
>> represent projective transforms, but otherwise, this stuff looks like
>> it's moving in the right direction. Note that Deron Johnson is working
>> in this space from an entirely different direction (for looking glass);
>> I asked him to try and construct an interface layer within the server
>> that would allow both the polygonal decomposition mechansim and their
>> own java adventures.
> Why do we need a quad mesh to represent projective transforms? As far as
> I could understand all we would get out of using a quad mesh instead of
> a tri mesh would be that we could do some fancier interpolation. But I
> though that most OpenGL implementations were decomposing all GL
> primitives to triangles anyhow and it seemed most useful to have the
> input match the output. We could have an additional request for setting
> a quad mesh if that's desirable of course. Am I missing something here?
I think a trimesh is fine. In fact, it helps deal with one potential
problem with a quadmesh: non-planar vertices. If you happen to have a
quad whose vertices don't all lie in the same plane, interpolating or
computing the parameters for a point inside the quad is troublesome.
More information about the xorg