using OpenGL to implement a window manager
Jon Smirl <[email protected]> Fri, 23 Apr 2004 16:40:32 -0700 (PDT)
| Newsgroups | gmane.comp.video.mesa3d.devel,gmane.comp.freedesktop.xserver |
|---|---|
| Message-ID | <[email protected]> |
Keith and I are discussing window composition on the xserver list. How do you implement window management with OpenGL? Suppose xserver is applying a trapezoidal transform to an application window before displaying it. Now I want to set this trapezoidal transform in OpenGL before letting the app draw the window. The app should be totally unaware I set this transform and instead think it is drawing into a flat rectangular buffer. The point in doing this is so that things will get scaled and aliased right. Drawing the app into a straight pbuffer and then transforming it is going to mess the text up. Text in the first case would be generated with knowledge of the transform when computing the glyph bitmap. Another example of this. Suppose I had a bitmap that was too big. When I draw it into a straight pbuffer I need to down sample by a half. But now xserver is displaying this window at a 2x magnification. The bitmap is going to look ugly. If instead I knew the xserver transform the bitmap resolution didn't have to be lost. Same logic could be applied to clipping. The xserver could be displaying a partial zoom of an app's window. If the app is painting to straight pbuffer it will paint the whole scene and then get it clipped by the server transform. Can this be done without messing with the OpenGL implementation? ===== Jon Smirl [email protected] __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25ยข http://photos.yahoo.com/ph/print_splash ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297