Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Create a Direct3D 10.0 device and a swap chain.
Syntax
HRESULT D3D10CreateDeviceAndSwapChain(
[in] IDXGIAdapter *pAdapter,
[in] D3D10_DRIVER_TYPE DriverType,
[in] HMODULE Software,
[in] UINT Flags,
[in] UINT SDKVersion,
[in] DXGI_SWAP_CHAIN_DESC *pSwapChainDesc,
[out] IDXGISwapChain **ppSwapChain,
[out] ID3D10Device **ppDevice
);
Parameters
[in] pAdapter
Type: IDXGIAdapter*
Pointer to a IDXGIAdapter.
[in] DriverType
Type: D3D10_DRIVER_TYPE
The type of driver for the device. See D3D10_DRIVER_TYPE.
[in] Software
Type: HMODULE
A handle to the DLL that implements a software rasterizer. Must be NULL if DriverType is non-software. The HMODULE of a DLL can be obtained with LoadLibrary, LoadLibraryEx, or GetModuleHandle.
[in] Flags
Type: UINT
Optional. Device creation flags (see D3D10_CREATE_DEVICE_FLAG) that enable API layers. These flags can be bitwise OR'd together.
[in] SDKVersion
Type: UINT
Bit flag that indicates the version of the SDK. Should be D3D10_SDK_VERSION, defined in d3d10.h.
[in] pSwapChainDesc
Type: DXGI_SWAP_CHAIN_DESC*
Description of the swap chain. See DXGI_SWAP_CHAIN_DESC.
[out] ppSwapChain
Type: IDXGISwapChain**
Address of a pointer to an IDXGISwapChain.
[out] ppDevice
Type: ID3D10Device**
Address of a pointer to an ID3D10Device Interface that will receive the newly created device.
Return value
Type: HRESULT
This method returns one of the following Direct3D 10 Return Codes.
Remarks
To create a device without creating a swap chain, see D3D10CreateDevice.
Requirements
| Requirement | Value |
|---|---|
| Target Platform | Windows |
| Header | d3d10misc.h |
| Library | D3D10.lib |
| DLL | D3D10.dll |