Lang said:
I guess I stand corrected... although there seems to be, in your reply,
some indication that the model is different and improved over XP.
Well this is basically what the difference is:
Under XP or any other previous versions of Windows whenever you draw
something it is generally drawn immediately to the screen. That is why you
can see the drawing. There is no double buffering.
In .Net 1.0 and up applications, you can turn on double buffering which
eliminates that problem. In that case, data is drawn to an off-screen
memory buffer and when done, this buffer is copied to the screen. Advantage
here is that the user cannot see the screen build up as it happens
off-screen, disadvantage though is that it carries a performance penalty
since this double buffer has to be copied to the screen now every time.
Not very many apps use that though and with the performance (or lack
thereof) of GDI it is not suitable for anything that needs to draw a lot of
stuff multiple times per second. The average app though only rarely needs
to redraw so it isn't really an issue for most applications.
Now what Vista does with their hardware accelerated desktop...they basically
eliminate the need for the application to double buffer their drawing...all
drawing is double buffered at all times. All applications, no matter what,
draw to an off-screen surface. The app doesn't even know its doing it nor
can it control it. It simply calls its GDI drawing functions as it always
has and the GDI function does what it needs to do.
The difference though is that the double buffer on a 3D Accelerated desktop
is a texture map residing in video memory of the video card. So once the
application has finished drawing...this texture map can be rendered onto a
polygon extremely fast. This can be just a simple quad, or a grid of quads,
or any other arbitrary shape.
This is the reason why such desktops can display previews of the app when
you switch between them as by design they have a copy of all the
application graphics as a texture.
This is also the reason why you can move apps around on the screen or do any
other things with the window that do not require a re-draw of its controls
extremely fast.
All that is being done in that case is that the texture mapped polygons are
being rendered in a different location. That is something that todays 3D
Accelerator can do extremely fast.
The same thing goes with the transparency they are so proud of. It is just a
simple side effect of using texture mapped polygons. A vertex at the very
least has to contain coordinates where it is located. But you can also add
color information to each vertex. Now when you do that, the video card will
in hardware modulate each pixel of the texture with the color information
of the vertex. If the vertex color contains only 50% alpha then the texture
map will be 50% alpha blended as a result of the modulation resulting in a
transparent window.
There's nothing special or revolutionary to it. The games you play have been
doing it for a long long long time.
The only thing that is ridiculous in Vista's case is the high hardware
requirement for this. Everything I've stated above could be done with a
legacy TNT 2 without the video card even breaking a sweat!
--
Stephan Rose
2003 Yamaha R6
å›ã®ã“ã¨æ€ã„出ã™ã²ãªã‚“ã¦ãªã„ã®ã¯
å›ã®ã“ã¨å¿˜ã‚ŒãŸæ™‚ãŒãªã„ã‹ã‚‰