High Quality vs. High Speed vs. DirectX Renderer Plugins
Posted by Andrew BT on 11 February 2019 02:07 PM
|
|
The documentation article about all renderer types available in SciChart can be found at this link. The example that demonstrates differences between different renderer types can be found in SciChart WPF Examples Suite Styling and Theming -> Use High Quality Rendering. The full source code of the example is available online at this link. The SciChart Renderer PluginsSciChart ships with three rasterizer plugins which use different algorithms to render the RenderableSeries to the screen. These are:
Take a look at the screenshots below to compare the visual output of the three rasterizer plugins: You can also compare the difference between the SciChart renderer plugins using our WPF Chart Examples Suite, Use High Quality Rendering Example. Enabling the HighSpeedRenderSurfaceBy default, SciChart uses the HighSpeedRenderSurface. This is available in all editions of SciChart. This has very a fast set of integer-coordinate line drawing algorithms, drawn to a bitmap, which are quick, but won't give you the pixel-perfect accuracy you might expect from WPF applications. Use this renderer if speed is paramount to you and you can sacrifice a little bit of quality. To enable the HighSpeedRenderSurface (enabled by default), use this code: <s:SciChartSurface> <s:SciChartSurface.RenderSurface> <s:HighSpeedRenderSurface/> </s:SciChartSurface.RenderSurface> </s:SciChartSurface> Enabling the HighQualityRenderSurfaceThe HighQualityRenderSurface is available in SciChart WPF & Silverlight Professional and Source-Code Editions. An alternative renderer which you must enable if you wish to use it, is the HighQualityRenderSurface. This has an extremely accurate, sub-pixel floating point rendering engine which yields results of very high quality. It is slower than the HighSpeedRenderSurface and should be used if quality is more important than speed. To enable the HighQualityRenderSurface, use this code: <s:SciChartSurface> <s:SciChartSurface.RenderSurface> <s:HighQualityRenderSurface/> </s:SciChartSurface.RenderSurface> </s:SciChartSurface> Enabling the Direct3D11RenderSurfaceThe Direct3D11RenderSurface is available for SciChart Source-Code Edition. This is a DirectX11 implementation of the RenderSurface which is able to provide the quality of HighQualityRenderSurface with speed comparable to or faster than the HighSpeedRenderSurface. Requires DirectX11 (Recommended) or DirectX10 compatible hardware, WPF4 and Windows Vista or up. Enabling the Direct3D10RenderSurfaceTo enable the Direct3D11RenderSurface, please use this code XAML <!-- Where s3D XML namespace is defined as --> <!-- xmlns:s3D="http://schemas.abtsoftware.co.uk/scichart3D" --> <!-- You will also need a reference to Abt.Controls.SciChart3D.Wpf.dll --> <s:SciChartSurface.RenderSurface> <s3D:Direct3D11RenderSurface InitializationFailed="OnDirectXInitializationFailed" RenderingFailed="OnDirectXRenderingFailed"/> </s:SciChartSurface.RenderSurface> Code Behind The DirectX Renderer is able to detect hardware failures and downgrade to software rendering. To enable this, please subscribe to the InitializationFailed and RenderingFailed events and handle them: private void OnDirectXInitializationFailed(object sender, DXErrorEventArgs e) { MessageBox.Show("DirectX Initialization Failed. " + "Downgrading to Software. See inner exception for details: " + e.Exception.Message); this.sciChart.RenderSurface = new HighSpeedRenderSurface(); } private void OnDirectXRenderingFailed(object sender, DXErrorEventArgs e) { MessageBox.Show("DirectX Initialization Failed. " + "Downgrading to Software. See inner exception for details: " + e.Exception.Message); this.sciChart.RenderSurface = new HighSpeedRenderSurface(); } Enabling the DirectX Renderer Plugin with Easy Fallback to Software RenderingSee also this article Easy Fallback from DirectX to Software Rendering without code-behind which presents a nice easy way to fall-back to software rendering (from DirectX) via a single attached property. Deploying Applications with the Direct3D11RenderSurfaceSee our article on Creating and Deploying Applications with the Direct3D11RenderSurface for deployment instructions. Tell Us Your Feedback!Tell us your feedback! Which renderer do you use and why? In our tests DirectX outperforms software renderers by >400% in some cases. What's it like on your machine? Is there something we can improve?
| |
|