Re: widget size independant to screen resolution
Lincoln Quirk <[email protected]> Wed, 20 Oct 2004 10:34:33 -0400
| Newsgroups | gmane.comp.graphics.y.devel |
|---|---|
| Message-ID | <[email protected]> |
On 20 Oct 2004, at 06:37, Phil wrote: > Lincoln Quirk wrote: >> This is what a GPU is for. Nearly all computers have them nowadays, >> and we can disable this functionality or accept that it will be slow >> on computers without a GPU. > > So your proposal is to render each window into a texture, have the > card generate a set of mipmaps for it, then display that texture on a > rectangle with a displayed size <= the original texture. > > That would cause a noticeable slow-down even with a decent graphics > system. I do not think the benefit (such as it is) outweighs the > cost, so I'm not going to bother trying it. > >> How do you think Apple's Expose feature works? Note that you don't >> get this feature (at full speed anyway) if you don't have Quartz >> Extreme (graphics acceleration on the desktop). > > I didn't think Exposé updated the windows while they were shrunk. I > got the impression that they would show a snapshot of the window at > the time of shrinkage. Of course, I could be wrong. I just tried it -- it definitely does update. It's really cool and very useful. (I can quickly use Expose to observe several simultaneously loading webpages, for example.) I believed this would be easily implementable under Y's design as I understood it -- we already have a separate buffer for each window, right? I don't really know much about hardware graphics -- but it seems to me that the features of the GPU (such as fast raster resizing) should be available even when you're not rendering in 3D. I figured a lot of Y's window code, especially compositing and the like, would go into the GPU if you had one. It makes a ton of sense to have the card do all your 2D graphics needs -- transparency and resizing being two of the most important. Regarding what you said about mipmaps, I don't believe that they are necessary (based on my understanding of them, which is admittedly not very good). The point of mipmaps is not to generate them every frame (they are pregenerated) -- but to make it faster/look better when rescaling the same texture to a different size each frame. And on the same note, I would guess that you don't need to build a rectangle and then "texture it", but you could rather simply tell the hardware to rescale a raster buffer and then render it onscreen. Anyway, perhaps I am totally off base here, in which case I will shut up. :) > > Phil Lincoln Quirk