IDirect3DDevice9::CreateAdditionalSwapChain

Creates an additional swap chain for rendering multiple views.

HRESULT CreateAdditionalSwapChain(
  D3DPRESENT_PARAMETERS* pPresentationParameters,
  IDirect3DSwapChain9** ppSwapChain
);

Parameters

pPresentationParameters
[in, out] Pointer to a D3DPRESENT_PARAMETERS structure, containing the presentation parameters for the new swap chain. This value cannot be NULL.

Calling this method changes the value of members of the D3DPRESENT_PARAMETERS structure.

ppSwapChain
[out, retval] Address of a pointer to an IDirect3DSwapChain9 interface, representing the additional swap chain.

Return Values

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_NOTAVAILABLE, D3DERR_DEVICELOST, D3DERR_INVALIDCALL, D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY.

Remarks

There is always at least one swap chain (the implicit swap chain) for each device because Direct3D 9 has one swap chain as a property of the device.

Note that any given device can support only one full-screen swap chain.

D3DFMT_UNKNOWN can be specified for the windowed mode back buffer format when calling IDirect3D9::CreateDevice, IDirect3DDevice9::Reset and CreateAdditionalSwapChain. This means the application does not have to query the current desktop format before calling CreateDevice for windowed mode. For full-screen mode, the back buffer format must be specified.

Requirements

Header: Declared in D3d9.h.

See Also

Presenting Multiple Views in Windowed Mode