Login
 
Archive
Links
Search
Blog List
There are no categories in this blog.
 
Oct 20

Written by: Jeremiah Morrill
10/20/2007 5:07 AM 

There have been too many Vista vs. OSX articles, in which almost all have been from a consumer perspective.  I'm a software developer, so I generally don't care how cool iPhoto is or want to get in a religious war of iTunes vs. Windows Media Player.  What I do want to talk about is UI.  More specifically, Vista DWM vs. OSX Quartz Compositor/Apple Core.

OSX

Introduction


I recently had my employer purchase me a Mac Pro.  It was a win/win situation because I can dual boot my Windows OS with OSX and at no risk because it wasn't my money.

I have not really used a Macintosh since 1999.  I believe System 9.5 was the last one I used.  See, I was a double major, computer science and computer graphics.   For computer graphics we had the Macintoshes.  That is where I learned to hate anything Apple made.  Not a single Mac could run Photoshop for more than 25 minutes without crashing (when I say crash I'm talking "sad mac" face) and the entire class would constantly request to "finish their work" in the CAD room next door, which was NT 4.  I had built up the idea that Macs were the feminine face of computing.  It was for people that don't want to care how a computer ran, but wanted something pretty for their desk that checked email.

Now enter 2007.  With my previous bias, I really wanted to come to the conclusion that OSX sucks.  I really did.  Macs are not just for women any more.  But now for men that have testicles.

OSX Quartz

I do not want to get off topic so here's the meat of OSX Quartz. Quartz is the UI compositor for OSX.  It offloads all the pretty desktop effects ontVo the GPU so we can get the smooth animation of the Dock, the "Genie" effect when we minimize or 3D effects on windows without taxing the CPU.  Apple's "Core Image" technology also does some interesting things like raster manipulation (blur, warp, shadow, etc) on the GPU without bothering the developer on the dirty details of pixel-shader programming.

Apple has done an excellent job showcasing their Quartz technology within their OS.  When you drag a "Widget" on your screen, you see a nice ripple effect.  Icons are highly animated in the Dock.  The whole desktop can smoothly move out of the way to show other options.  Windows that go full-screen generally have a smooth fade effect attached with it.

Vista

Introduction


I've been running Vista since the first day it was out.  I was really excited to get it and overall very happy with it.  Vista has been receiving a lot of bad press, especially amongst the IT crowd.  Most of the complaints are a rehash of the problems with XP and I mostly disregard these as people thinking they can have a six-year-old computer run it or it's the old dog not wanting to learn new tricks.

Vista DWM

The Vista DWM (Desktop Window Manager) is what I was excited about the most with Vista.  The DWM is an ingenious piece of work that renders all windows to the GPU of a video card.  Conceptually it is very similar to the OSX Quartz engine.  This gives the OS the ability to do things like "Flip3D" and other minor window effects.

After getting dirty with the Vista SDK, I have to say the DWM API was a HUGE disappointment.   Let me explain.  The OS obviously has the ability to take windows and render the output to 3D textures (as seen in Flip3D).  It also has the ability to do advanced effects on the window (as seen in the blurred glass) via pixel shaders.  For some reason Microsoft does not want ISV enhancing it.  They have only provided an API for getting live thumbnails of windows.  This does little for anyone.  Some people have made use of this API, making an Expose like feature for Vista.  In my opinion, Switcher (http://insentient.net/) surprisingly is better than the stock OSX version.

Conclusion

I think at the moment Apple is a head of the desktop composition curve, but I Vista's DWM has more [locked away] potential.  With the power of DirectX/3D (and hardware manufactures developing pretty much FOR DirectX) built right into the desktop, I think we can expect a UI experience that leap frogs Quartz.Microsoft just has to open the damned API.   Come on Microsoft, I know all about the "DwmpDxGetWindowSharedSurface" in dwmapi.dll.  Just give us some header files and we'll shut up.

If anyone is interested in hacking the dwmapi.dll, let me know [jeremiah.morrill at gmail.com].  I've been able to get the Direct3D surface of my applications window and render it to a 3D mesh, but requesting any other window renders a black texture and makes other apps crash.

Tags:

8 comment(s) so far...

Re: Vista vs. OSX - Desktop Composition

You didn't mention that the DWM compositor doesn't play well with the applications it's compositing. For example, when DWM is responsible for drawing the window's frame (border/titlebar), it doesn't wait for the application to draw its UI. The result is that on resizing a window, you see a "gap" between the app's UI and the border.
Also, perf of animating content contained in a layered window sucks because alpha blending is done on by GDI+, which is in system ram. Even with the latest patch for that problem, it still isn't speedy.

By d w m u s e r on   10/20/2007 8:44 AM

Re: Vista vs. OSX - Desktop Composition

Well I can understand the DWM not waiting for the GDI app to redraw. If it waited, then the experience would be even worse. As for the layered window issues...that is a damned shame. This only seems to be an issue though with WPF applications. There is a good example here: http://www.codeproject.com/directx/umvistad3d.asp Run some of the frameless samples. It shows that layered windows can be accelerated within Vista.

By JMoney on   10/21/2007 8:08 AM

Re: Vista vs. OSX - Desktop Composition

You make the point that the DWM kinda sucks from a developers POV but don't really talk about what Quartz looks like from a developer perspective? Any thoughts, or is spending a few months becoming an Animation Core expert just to answer my question asking a bit much?

By JosephCooney on   12/17/2007 4:59 AM

Re: Vista vs. OSX - Desktop Composition

You make the point that the DWM kinda sucks from a developers POV but don't really talk about what Quartz looks like from a developer perspective? Any thoughts, or is spending a few months becoming an Animation Core expert just to answer my question asking a bit much?

By JosephCooney on   12/17/2007 4:59 AM

Re: Vista vs. OSX - Desktop Composition

You make the point that the DWM kinda sucks from a developers POV but don't really talk about what Quartz looks like from a developer perspective? Any thoughts, or is spending a few months becoming an Animation Core expert just to answer my question asking a bit much?

By JosephCooney on   12/17/2007 4:59 AM

Re: Vista vs. OSX - Desktop Composition

Whoops....looks like your captcha confused me a little. Sorry for the dupes.

By JosephCooney on   12/17/2007 5:00 AM

Re: Vista vs. OSX - Desktop Composition

The desktop composition in Vista is done through the Xaml interpreter. Expression suite covers the incredible things you can do with the WDM. Quartz requires an intimate knowledge of how Quartz works. The API is quite huge. The cool part is that the Vista front end, all of it, can be scripted now and the compositing is done by the graphics engine for you. The adavanced effects can easily be scripted and put on a web page/.

Silverlight is the Xaml compositing engine for the web. Silverlight does not require a Mac to use and the Vista software world is now quite easy to do and includes designers in the over all system. The improvements to the Vista front end are there because of the separation of the graphics engine from down to the metal programmers so Vista applications that use the higher end graphics have very little work to do.

By Don Flowers on   5/7/2008 11:25 AM

madxxx animation 3d flash multimedia graphic design

it's very nice
I like it

madxxx animation 3d flash multimedia graphic design
http://madxxx.freevar.com

By madxxx animation 3d flash multimedia graphic desig on   6/13/2008 7:47 AM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 
  Minimize
Text/HTML Minimize
Copyright 2007
Downloaded from DNNSkins.com