Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Create an off-screen surface.
HRESULT CreateOffscreenPlainSurface(
[in] UINT Width,
[in] UINT Height,
[in] D3DFORMAT Format,
[in] D3DPOOL Pool,
[out, retval] IDirect3DSurface9 **ppSurface,
[in] HANDLE *pSharedHandle
);
[in] Width
Type: UINT
Width of the surface.
[in] Height
Type: UINT
Height of the surface.
[in] Format
Type: D3DFORMAT
Format of the surface. See D3DFORMAT.
[in] Pool
Type: D3DPOOL
Surface pool type. See D3DPOOL.
[out, retval] ppSurface
Type: IDirect3DSurface9**
Pointer to the IDirect3DSurface9 interface created.
[in] pSharedHandle
Type: HANDLE*
Reserved. Set this parameter to NULL. This parameter can be used in Direct3D 9 for Windows Vista to share resources.
Type: HRESULT
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_DEFAULT is the appropriate pool for use with the IDirect3DDevice9::StretchRect and IDirect3DDevice9::ColorFill.
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.
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d9helper.h (include D3D9.h) |
Library | D3D9.lib |
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!