tags:

views:

57

answers:

1

I am using Layered windows and they seem to impose quite the performance penalty (one of my cores is used completely). Is there any way to tweak performance with layered windows? Is Direct2D a viable alternative? (my layered window needs to have per-pixel alpha).

thanks, H

A: 

On Vista and later (under Aero), it shouldn't affect performance too much since the OS uses compositing anyway and it is optimized for this (which is why Microsoft recommends a graphics card for running Vista). On XP, it definitely slows things down because it wasn't designed with full-fledged alpha compositing in mind.

By per-pixel alpha, do you mean that you want parts of your window to be transparent? If yes, DirectX won't help you at all - DirectX will only help in rendering transparent images onto your window's background, but won't make your window itself transparent.

casablanca
No, it's the other way around. Without Aero, it is done by the video hardware. Very efficient, it takes no CPU cycles.
Hans Passant
What do you mean? Isn't Aero the name for the new compositing engine in Vista onwards?
casablanca