DXImage Class |
public sealed class DXImage : Image, IDisposable
The DXImage type exposes the following members.
Name | Description | |
---|---|---|
EnableSoftwareFallback | EnableSoftwareFallback specifies the value that is used for enableSoftwareFallback parameter in the call to the D3DImage.SetBackBuffer method. When it is set to true (by default) and .Net 4.5 version of DXEngine is used, then this allows using DXEngine with PresentationType set to DirectXImage over Remote Desktop. This property must be set before the back buffer in the D3D11ImageSource is created (usually before Loaded event). | |
IsUsingD3DImage | Gets a boolean that specifies if a D3DImage is used to show the content of this control. In this case the scene rendered with DirectX 11 stays in the GPU memory and is shared with WPF composition engine. When IsUsingD3DImage is false, the rendered DirectX 11 image is copied into main CPU memory and converted into a WritableBitmap. | |
IsUsingWritableBitmap | Gets a boolean that specifies if a WritableBitmap is used to show the content of this control. In this case the rendered DirectX 11 image is copied into main CPU memory and converted into a WritableBitmap. When IsUsingWritableBitmap is false, a D3DImage is used to show the image that is already stored in the GPU memory. |
Name | Description | |
---|---|---|
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |
InitializeDXScene | InitializeDXScene method must be called to connect the DXImage control to the DXScene that will render the DirectX scene. The method must be called after the DXScene is initialized and before the scene is rendered. | |
InvalidateD3DImage | Refresh method updates the underlying D3D11ImageSource with marking it dirty so WPF will update it. | |
RecreateD3DImageSource | RecreateD3DImageSource disposes the current D3DImageSource and creates a new instance of D3DImageSource. This method is internally called when the primary monitor is changed. This prevents crashes of WPF rendering thread. User may also manually call this method to prevent some similar problems (please also contact support@ab4d.com in such cases). | |
SetDpiScale | Sets the Dpi scale that will be used by this DXImage |
Name | Description | |
---|---|---|
DefaultSystemAdapterChangedAction | DefaultSystemAdapterChanged event is triggered when the default system adapter (the primary system GPU) is changed. This means that it is not longer possible to share a DXEngine's texture with WPF. DXEngine will need to switch to WritableBitmap that is much slower than shared texture because the rendered scene needs to be copied from GPU memory to to CPU memory. In this case it is recommended to save the current scene, dispose the DXViewportView and create a new DXViewportView that will use the new graphics card. |