Prev | Current Page 68 | Next

Matthew MacDonald

"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"

Based on these details, it assigns a rendering tier
value.
WPF recognizes three rendering tiers. They are as follows:
??? Rendering Tier 0. The video card will not provide any hardware acceleration. This corresponds to a
DirectX version level of less than 7.0.
??? Rendering Tier 1. The video card can provide partial hardware acceleration. This corresponds to a
DirectX version level greater than 7.0 but less than 9.0.
??? Rendering Tier 2. All features that can be hardware accelerated will be. This corresponds to a DirectX
version level greater than or equal to 9.0.
In some situations, you might want to examine the current rendering tier programmatically, so you can
selectively disable graphics-intensive features on lesser-powered cards. To do so, you need to use the static
Tier property of the System.Windows.Media.RenderCapability class. But there??™s one trick. To extract the tier
value from the Tier property, you need to shift it 16 bits, as shown here:
Dim renderingTier As Integer = RenderCapability.Tier >> 16
If renderingTier = 0 Then
...
ElseIf renderingTier = 1 Then
...
End If
This design allows extensibility. In future versions of WPF, the other bits in the Tier property might be
used to store information about support for other features, thereby creating subtiers.
For more information about what WPF features are hardware-accelerated for tier 1 and tier 2, and
for a list of common tier 1 and tier 2 video cards, refer to http://msdn2.


Pages:
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80