IDirect3DDevice::EndScene

The IDirect3DDevice::EndScene method ends a scene that was begun by calling the IDirect3DDevice::BeginScene method.

HRESULT EndScene();
 

Parameters

None.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value is an error.

Remarks

When this method succeeds, the scene will have been rendered and the device surface will hold the contents of the rendering.

Do not attempt to use GDI functions that use the device context of a render-target surface between calls to BeginScene and EndScene. Attempts to do so can prevent the results of the GDI operations from being visible. If your application uses GDI functions, make sure that all GDI calls are made outside of the scene functions.

You must call this method before you can call the IDirect3DDevice::BeginScene method to start rendering another scene, even if the previous attempt to render was unsuccessful.

QuickInfo

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in d3d.h.
  Import Library: Use ddraw.lib.

See Also

IDirect3DDevice::BeginScene, Beginning and Ending a Scene