Jan 17 |
Posted by Andrew on 17 January 2017 10:40 AM
|
Once we move away from the happy, safe world of .NET and into unmanaged code, we need to take a few extra steps to ensure compatibility! This post aims to address compatibility issues with using the Direct3D10RenderSurface, a premium add-on to SciChart High Performance WPF Charts. Direct3D10RenderSurface System RequirementsOperating System RequirementsThe SciChart Direct3D10RenderSurface requires Windows Vista, 7, 8, 8.1 or higher. Hardware RequirementsThe SciChart Direct3D10RenderSurface requires a DirectX10 compatible GPU.
PrerequisitesThe SciChart Direct3D10Renderer has a dependency on D3DX9_43.dll and D3DX10_43.dll.
Deploying your SciChart Application with the Direct3D10RenderSurfaceDeveloper PCs and End-User PCs have the same system requirements to run the SciChart DirectX Renderer. To ensure your SciChart application can use the Direct3D10RenderSurface wherever available, and downgrade to software renderer when not available, please follow these steps: 1. Enable the DirectX RendererFollow the example at Easy Fallback from DirectX to Software Rendering without code behind: <SciChartSurface DirectXHelper.TryApplyDirectXRenderer="True"> ... </SciChartSurface> 2. Distribute SharpDX 2.6.2 with your ApplicationThe Direct3D10RenderSurface also has a dependency on SharpDX v2.6.3 (a Managed Wrapper for DirectX, licensed under the MIT License). Please make sure the following DLLs are in your output directory (where your application exe resides) when deploying applications with DirectX. SharpDX is also available on NuGet.
3. Ensure the DirectX Runtime is installed on End-User PCsAll End-User PCs must have the DirectX Runtime installed. The package is included in the SciChart v3.2.4 or later installation directory at %InstallDir%\Prerequisites\DirectX. You will need to include the DirectX Prerequisites and install DXSetup.exe on end-user PCs when you deploy your application*. To silently install the DirectX Runtime on end-user PC’s, please run the following command line in your application deployment process:
*Microsoft permits you to redistribute the above files with your end-user applications royalty free. The licensing terms for DXSetup can be found in the licensing agreement of the DirectX End-User Runtimes (June 2010) Frequently Asked QuestionsQ: How can I check at runtime if the DirectX renderer is supported on my PC?A: You can use the Direct3D10CompatibilityHelper class! Usage: /// <summary> /// A helper class which can be used to detect if the Direct3D10 enhancements to SciChart can run on the current hardware & operating system /// </summary> public static class Direct3D10CompatibilityHelper { /// <summary> /// Supported operating systems include Windows Vista, Windows 7, Windows 8, 8.1 and up. Windows XP, 2000, 2003 are not supported. /// </summary> public static bool IsSupportedOperatingSystem { get; } /// <summary> /// Determines if the DirectX10 Runtime Libraries can be found in the C:\Windows\System32 and C:\Windows\SysWow64 folders. If the libraries are not present, we recommend /// installing the DirectX Runtime from %SciChart Install Dir%/Prerequisites/DirectX. /// This installs platform specific libraries (x86, x64) and SciChart dynamically chooses the correct DirectX version at runtime /// </summary> public static bool HasDirectX10RuntimeInstalled { get; } /// <summary> /// Determines if the current GPU supports DirectX10 or later /// </summary> public static bool HasDirectX10CapableGpu { get; } /// <summary> /// Determines if the current hardware & software configuration fully supports DirectX10 or later /// </summary> public static bool SupportsDirectX10 { get { return IsSupportedOperatingSystem && HasDirectX10RuntimeInstalled && HasDirectX10CapableGpu; } } } Q: Do I have to install the DirectX Runtime on every End-User PC?A: SciChart actually only requires D3DX9_43.dll and D3DX10_43.dll The way to deploy them is by including DXSetup.exe and related files (found in the %SciChartInstallDir%\Prerequisites\DirectX folder) with your application deployment. You can run DXSetup on end-user PCs by calling the command line
Please note: The licensing terms for the DirectX Runtime restrict you from packaging or embedding the required DLLs with your application, but allows distributing DXSetup and associated files in the %SciChartInstallDir%/Prerequisites/DirectX folder. You must run the DXSetup installer on end-user PCs to remain compliant with Microsofts terms. Q: Does the DirectX Renderer Work over Remote Desktop?A: We use D3DImage, which is a Microsoft control that allows sharing of DirectX content with WPF, avoiding airspace issues and allowing fast interop between WPF’s DirectX9 and DirectX10 rendering. Unfortunately D3DImage has a bug, a nasty one. It won’t work over remote desktop if your application is .NET4.0! It will work over Remote Desktop on .NET4.5 and above. Since SciChart v4 we have developed a workaround where SciChart DirectX will now work over remote desktop. This is automatic and no changes need to be applied to your code. Q: I am experiencing flicker with DirectX in my applicationPlease see this FAQ which talks about how to resolve the problem of Flickering Charts in SciChart. Q: How much faster is the DirectX Renderer than the Software Renderer?A: The answer will depend on your exact hardware, software configuration and what you are doing with the chart. In our tests we found the DirectX Renderer to be on average 3.92x faster than the High Speed software renderer, and with superior visual quality (sub-pixel antialiasing). Not bad for a drop-in upgrade!
Got Feedback?DirectX is a big part of our future, so we want to make this work for you. If you experience compatibility issues or other problems using the DirectX renderer, then please do get in contact with your feedback. We would love to be of assistance.
The post DirectX WPF Chart Compatibility appeared first on Fast, Native Chart Controls for WPF, iOS, Android and Xamarin. | |