Create an off-screen surface.
HRESULT CreateOffscreenPlainSurfaceEx( [in] UINT Width, [in] UINT Height, [in] D3DFORMAT Format, [in] D3DPOOL Pool, [out, retval] IDirect3DSurface9 **ppSurface, [in] HANDLE *pSharedHandle, [in] DWORD Usage );
- Width [in]
Width of the surface.
- Height [in]
Height of the surface.
- Format [in]
Format of the surface. See D3DFORMAT.
- Pool [in]
Surface pool type. See D3DPOOL.
- ppSurface [out, retval]
Pointer to the IDirect3DSurface9 interface created.
- pSharedHandle [in]
Reserved. Set this parameter to NULL. This parameter can be used in Direct3D 9 for Windows Vista to share resources.
- Usage [in]
Combination of one or more D3DUSAGE constants which can be OR'd together. Value of 0 indicates no usage.
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be the following: D3DERR_INVALIDCALL.
D3DPOOL_SCRATCH will return a surface that has identical characteristics to a surface created by the DirectX 8.x method CreateImageSurface.
D3DPOOL_MANAGED is not allowed when creating an offscreen plain surface. For more information about memory pools, see D3DPOOL.
Off-screen plain surfaces are always lockable, regardless of their pool types.