|Microsoft DirectX 9.0|
Creates an additional swap chain for rendering multiple views.
D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** ppSwapChain );
- [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.
- If BackBufferCount == 0, calling CreateAdditionalSwapChain will increase it to 1.
- If the application is in windowed mode, and if either the BackBufferWidth or the BackBufferHeight == 0, they will be set to the client area width and height of the hwnd.
- [out, retval] Address of a pointer to an IDirect3DSwapChain9 interface, representing the additional swap chain.
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be one of the following values.
D3DERR_NOTAVAILABLE This device does not support the queried multisample type.
D3DERR_DEVICELOST The device has been lost but cannot be reset at this time. Therefore, rendering is not possible. D3DERR_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value. D3DERR_OUTOFVIDEOMEMORY Microsoft?Direct3D?does not have enough display memory to perform the operation. E_OUTOFMEMORY Direct3D could not allocate sufficient memory to complete the call.
There is always at least one swap chain (the implicit swap chain) for each device because Direct3D for Microsoft DirectX?9.0 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.