IDirect3DDevice IDirect3DDevice IDirect3DDevice IDirect3DDevice Interface
Definition
This represents an IDXGIDevice and can be used to interop between Windows Runtime components that need to exchange IDXGIDevice references.
public : interface IDirect3DDevicepublic interface IDirect3DDevicePublic Interface IDirect3DDevice// You can use this interface in JavaScript.
- Inheritance
-
IDirect3DDeviceIDirect3DDeviceIDirect3DDeviceIDirect3DDevice
- Attributes
Windows 10 requirements
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited methods
Examples
First include the necessary headers and namespaces:
#include <Windows.Graphics.DirectX.Direct3D11.interop.h>
#include <dxgi.h>
using namespace Windows::Graphics::DirectX::Direct3D11;
using namespace Microsoft::WRL;
To get the native DirectX device that is wrapped by a Direct3DDevice:
IDirect3DDevice^ d3dDevice = ...;
ComPtr<IDXGIDevice> nativeDevice;
HRESULT hr = GetDXGIInterface(d3dDevice, nativeDevice.GetAddressOf());
To create a new Direct3DDevice object wrapping a native DirectX device:
ComPtr<IDXGIDevice> nativeDevice = ...;
IDirect3DDevice^ winRTDevice = CreateDirect3DDevice(nativeDevice.Get());
Remarks
To move back and forth between IDirect3DDevice and IDXGIDevice, use the CreateDirect3DDevice and GetDXGIInterface(IDirect3DDevice^, DXGIType**) functions.
Methods
See Also
- IClosable IDisposable IDisposable IDisposable