views:

1695

answers:

1

I'm trying to use the MediaElement control in WPF to play back video. It works great in Vista, but when I run it on an XP machine I get tearing in the display. It looks as if it's not using the vertical synch, and just updating the screen mid-draw.

Anyone know how to fix this problem?

A: 

This has more to do with the way WPF renders to the screen under XP compared to Vista. Under Vista, apps render to an offscreen buffer which is then composited with other windows that have changed and is presented to the screen at the appropriate intervals by a process called DWM.exe. That can (and presumably does) present WPF's window updates to the video buffer synchronized with the refresh interval.

On XP WPF uses DirextX to render straight to the screen and updates the video buffer whenever it wants to. There might be some way to get it to synchronise with the refresh interval, but I haven't looked into it because I don't use XP any more.

U62