DXDevice Class |
public class DXDevice : DisposableDXResource
The DXDevice type exposes the following members.
Name | Description | |
---|---|---|
Adapter | Gets an adapter (graphics card) that is used by the created Device. Adapter is null if the Device is not yet created. | |
BackgroundThreadsManager | Gets or sets a BackgroundThreadsManager that is used for background rendering in DXScene objects (if DXScene does not provide its onw instance of BackgroundThreadsManager). | |
CommonStates | CommonStates that store all common states | |
Configuration | DXDeviceConfiguration configuration used for creation of DirectX Device and SwapChain. | |
Device | Gets a DirectX device that is used by this DXDevice | |
DeviceCapabilities | DeviceCapabilities for this DirectX device | |
DeviceDescription | Gets device description that is retrieved from the Adapter.Description.Description. | |
DeviceId | Gets device id that is retrieved from the Adapter.Description.DeviceId. | |
DXGIVersion | Gets the DXGI version supported by the Device and operating system. The versions can be from 1.1 to 1.4. | |
EffectsManager | EffectsManager that stores all registered effects | |
ImmediateContext | Gets a DirectX Immediate Device context | |
ImmediateContextStatesManager | ContextStatesManager that is used for the immediate contex | |
IsDebugDevice | Gets a boolean that specifies if the created Device was created with Debug layer. Note that this property can be false even when the CreateDebugDirectXDevice is true. This indicates that the debug device cannot be created. This can be cased because debug layer is disabled in "DirectX Control panel" or the Debug layer is not installer on the system (it is usually installed with Visual Studio or with Windows SDK). | |
IsMeasuringMeshUpdateStatistics | Gets or set a Boolean that specifies if mesh updates are tracked during DXScene's Update phase. This value is automatically to true when IsCollectingStatistics is true. In this case the engine is setting MeshUpdatesCount and MeshBytesUploaded properties that are then set to RenderingStatistics object. | |
IsRemoteDevice | Gets a boolean that specifies if the device is a remote device (Adapter.Description1.Flags has Remote flag set). | |
MeshBytesUploaded | Gets the total uploaded bytes that were uploaded from CPU to GPU memory to update meshes. This value is automatically set by various parts of DXEngine when IsMeasuringMeshUpdateStatistics is true. This value is used to set the MeshBytesUploaded. | |
MeshUpdatesCount | Gets the number of mesh buffers that were updated during Update phase. This value is automatically set by various parts of DXEngine when IsMeasuringMeshUpdateStatistics is true. This value is used to set the MeshUpdatesCount. | |
TextureCache | TextureCache is used to cache the textures |
Name | Description | |
---|---|---|
CreateBlendState(BlendStateDescription) | CreateBlendState returns a BlendState from BlendStateDescription. | |
CreateBlendState(BlendOption, BlendOption) | CreateBlendState returns a BlendState from sourceBlend and destinationBlend and operation set to Add for RGB channels (alpha values blend are added together). | |
CreateConstantBuffer | CreateConstantBuffer returns a Buffer that represents a constants buffer. | |
CreateDepthStencilBuffer | CreateDepthStencilBuffer returns a Texture2D that represents a DepthStencilBuffer with the specified size, multisample description and format | |
CreateDepthStencilState | CreateDepthStencilState returns a DepthStencilState | |
CreateDepthStencilView(Int32, Int32, SampleDescription, String) | CreateDepthStencilView returns a DepthStencilView with the specified size and multisample description | |
CreateDepthStencilView(Int32, Int32, SampleDescription, Format, String) | CreateDepthStencilView returns a DepthStencilView with the specified size, multisample description and format | |
CreateDevice | CreateDevice creates DirectX device with specified parameters. This method correctly handles device creation when featureLevels array contains Level_11_1 but that runtime is not installed on the system (for example on Windows 7 SP 1 without Platform Update). If device cannot be created an exception is thrown or null is returned. | |
CreateDXSceneWithBackBuffer(Int32, Int32, Int32, Int32, Single, Single, String) | CreateDXSceneWithBackBuffer creates a DXScene that will be using BackBuffer (instead of SwapChain) to render its content to. | |
CreateDXSceneWithBackBuffer(Int32, Int32, Int32, Int32, Single, Single, Boolean, String) | CreateDXSceneWithBackBuffer creates a DXScene that will be using BackBuffer (instead of SwapChain) to render its content to. | |
CreateDXSceneWithSwapChain | CreateDXSceneWithSwapChain creates a DXScene that is using SwapChain to show its content. | |
CreateRasterizerState | CreateRasterizerState returns a RasterizerState. | |
CreateSamplerState | CreateSamplerState returns a SamplerState | |
CreateSwapChain(IntPtr, Int32, Int32, SampleDescription) | CreateSwapChain returns a SwapChain for the specified window handle, size and multisample description. | |
CreateSwapChain(IntPtr, Int32, Int32, SampleDescription, SwapEffect) | CreateSwapChain returns a SwapChain for the specified window handle, size and multisample description. | |
CreateTexture2D(Texture2DDescription) | CreateTexture2D returns a buffer as Texture2D. | |
CreateTexture2D(Int32, Int32, SampleDescription, Boolean, Boolean, Boolean) | CreateTexture2D returns a buffer as Texture2D with standard format (defined by StandardBufferFormat). | |
CreateTexture2D(Int32, Int32, SampleDescription, Boolean, Boolean, Boolean, Boolean, Format) | CreateTexture2D returns a buffer as Texture2D. | |
CreateTexture2DDescription(Int32, Int32, SampleDescription, Boolean, Boolean, Boolean) | CreateTexture2DDescription returns a Texture2DDescription that can be used to create a back buffer with standard format (defined by StandardBufferFormat). | |
CreateTexture2DDescription(Int32, Int32, SampleDescription, Boolean, Boolean, Boolean, Boolean, Format) | CreateTexture2DDescription returns a Texture2DDescription that can be used to create a back buffer. | |
DisposeWithDXDevice | DisposeWithDXDevice method adds the specified disposable object to the list of objects that will be disposed when this DXDevice will be disposed. | |
GetAllSystemAdapters | Returns all Adapter1 that are supported on the system. | |
GetUsedMultisamplingDescription | GetUsedMultisamplingDescription returns a SampleDescription from specified multisampleCount | |
InitializeDevice | InitializeDevice creates the DirectX device if it was not yet created. | |
IsAnyDXSceneRegistered | Gets true if any DXScene is using this DXDevice. Else returns false. | |
IsUsingDefaultSystemAdapter | Returns true if the default system adapter is used. |
Name | Description | |
---|---|---|
BeforeDeviceDisposed | Occurs just before the DirectX device will be disposed and after all other resources have been already disposed. Can be used to check for undisposed resources. |
Name | Description | |
---|---|---|
Logger | Logger object is always null in release build. | |
MaxTextureDimension | Max width or height of the texture in DirectX 11. | |
NoMultisamplingSampleDescription | SampleDescription that is used to define no multisampling | |
ResourcesCache | Gets or sets an IDisposable object that can be used for caching the resources created on this DXDevice. This property is used by DXViewportView to cache WpfMaterial, DXMeshGeometry3D and SceneNodes objects created from WPF objects. It is not recommended to set this property to any other value. | |
StandardBufferFormat | Standard back buffer format (Default value B8G8R8A8_UNorm is required by WPF) | |
StandardDepthStencilFormat | Standard format for DepthStencil buffer (D32_Float - 32 bit depth buffer, no stencil buffer) | |
StandardSwapEffect | Gets or sets a SwapEffect that is used to create the SwapChain (if supported by the operating system and device). By default this value is set to FlipDiscard that is used if supported by OS. Otherwise FlipSequential is used and if this is not supported then Discard is used. |