DirectX SDK |
The IDirect3D7::CreateDevice method creates a Direct3D device to be used with the DrawPrimitive methods.
HRESULT CreateDevice( REFCLSID rclsid, LPDIRECTDRAWSURFACE7 lpDDS, LPDIRECT3DDEVICE7 * lplpD3DDevice, );
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value is an error. The method returns DDERR_INVALIDPARAMS if one of the arguments is invalid.
All rendering devices created by a given Direct3D object share the same physical resources. Although your application can create multiple rendering devices from a single Direct3D object, because they share the same hardware, extreme performance penalties will be incurred.
In the legacy IDirect3D3 interface, this method accepted pointers to the IDirectDrawSurface4 and IDirect3DDevice3 interfaces.
When you call IDirect3D7::CreateDevice, you create a device object that is separate from a DirectDraw surface object. This device uses a DirectDraw surface as a rendering target.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Version: Requires DirectX 7.0.
Header: Declared in d3d.h.
IDirect3DDevice7, Creating a Direct3D Device, Direct3D Devices