Device.EndScene() Method (Microsoft.DirectX.Direct3D)

Ends a scene that was started by calling the Device.BeginScene method.


Visual BasicPublic Sub EndScene()
C#public void EndScene();
void EndScene();
JScriptpublic function EndScene();


Every call to BeginScene should eventually be followed by a call to EndScene before the display is updated with Device.Present.

When EndScene succeeds, the scene is queued up for rendering by the driver. The method is not synchronous, so the scene is not guaranteed to have completed rendering when the method returns.

When scene rendering begins successfully, this method must be called before calling the Device.BeginScene method to start rendering another scene. If a prior call to Device.BeginScene fails, the scene did not begin and this method should not be called.

InvalidCallException The method failed because EndScene was called before BeginScene.