VCL Controls: DirectX Hardware Acceleration
- 3 minutes to read
The DirectX® hardware acceleration mode uses parallel calculations and utilizes a client machine’s integrated or discrete GPU to render DevExpress controls. Compared to a combination of GDI and GDI+, the DirectX® acceleration mode can increase the frame rate of graphics-rich applications with multiple animated visual elements on High-DPI (4K+) displays. The performance gain ranges from 1.5
to 3
times and depends on the number of simultaneously displayed visual elements, hardware configuration, operating system, and driver versions.
A control in DirectX® render mode creates a Direct3D device context and uses a Direct2D-based canvas instead of a combination of GDI and GDI+ API-based canvases to draw content and UI elements. This mode is the most beneficial on a client machine with a discrete graphics card, since calculation load shifts from CPU to GPU and bitmap storage relies on frame buffer objects in video memory instead of GDI-based images in system memory.
Supported DevExpress VCL Controls
The following graphics-rich controls support the DirectX® hardware acceleration mode:
- VCL Chart Control
- Allows you to visualize data as bar, area, line, pie, and doughnut series with multiple chart appearance customization options.
- VCL Tile Controls
- TdxTileControl and TdxTileBar controls allow you to create touch-friendly user interfaces inspired by Microsoft Windows® 8.
- VCL Gallery Control
A gallery control is designed to display a set of items categorized into groups and arranged into rows and columns. Gallery controls include:
- TdxGalleryControl
- A gallery control.
- TdxColorGallery
- An unbound color gallery control.
- TdxDBColorGallery
- A data-aware color gallery control.
- VCL Gantt Control
- A project management tool that allows users to schedule activities related to project goals.
Enable DirectX® Render Mode
You can enable the DirectX® hardware acceleration mode application-wide or only for individual controls that support it.
Global Render Mode Setting
Assign rmDirectX
to one of the following look-and-feel render mode properties to enable this mode application-wide:
The RenderMode property available in the TcxLookAndFeelController and TdxSkinController components.
The RenderMode property available in the root look & feel settings. Call the RootLookAndFeel global function to access this property.
Individual Render Mode Settings
Assign rmDirectX
to an individual control’s LookAndFeel.RenderMode property to enable the DirectX® render mode for the control. This setting has priority over global render mode settings.
Note
Render mode settings do not affect controls that support only the GDI render mode.
Fallback Render Mode
If a control cannot create a Direct3D device context, it uses GDI as the fallback render mode. This error can happen because of an unavailable DirectX11® API call due to an unsupported operating system version, a graphics card driver issue, etc.
Requirements and Limitations
The DirectX® render mode is supported in Windows 7 Platform Update (with DirectX11®) and newer.
The DirectX® render mode is unavailable if an application is in GDI Scaled mode because it draws DirectX-rendered controls unscaled at their original (unscaled) positions.
All controls always rely on GDI and GDI+ at design time.
A control’s Transparent property value has no effect in DirectX® render mode, since the control has an opaque Direct3D device context that overlaps any background elements.
In DirectX® render mode, all GDI and GDI+ draw calls made through a control’s Canvas and ActiveCanvas properties have no effect.