War diese Seite hilfreich?
Ihr Feedback ist uns wichtig. Teilen Sie uns Ihre Meinung mit.
Weiteres Feedback?
1500 verbleibende Zeichen
MSDN Library
EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

D3D10CreateDeviceAndSwapChain function

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

pAdapter [in]

Type: IDXGIAdapter*

Pointer to a IDXGIAdapter.

DriverType [in]

Type: D3D10_DRIVER_TYPE

The type of driver for the device. See D3D10_DRIVER_TYPE.

Software [in]

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.

Flags [in]

Type: UINT

Optional. Device creation flags (see D3D10_CREATE_DEVICE_FLAG) that enable API layers. These flags can be bitwise OR'd together.

SDKVersion [in]

Type: UINT

Bit flag that indicates the version of the SDK. Should be D3D10_SDK_VERSION, defined in d3d10.h.

pSwapChainDesc [in]

Type: DXGI_SWAP_CHAIN_DESC*

Description of the swap chain. See DXGI_SWAP_CHAIN_DESC.

ppSwapChain [out]

Type: IDXGISwapChain**

Address of a pointer to an IDXGISwapChain.

ppDevice [out]

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.

Note  If you call this API in a Session 0 process, it returns DXGI_ERROR_NOT_CURRENTLY_AVAILABLE.
 

Requirements

Header

D3D10Misc.h

Library

D3D10.lib

DLL

D3D10.dll

See also

Core Functions

 

 

Community-Beiträge

HINZUFÜGEN
Anzeigen:
© 2015 Microsoft