Microsoft DirectX 9.0 SDK Update (October 2004)

Device.EndScene Method

Language:

Note: This documentation is preliminary and is subject to change.

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

Definition

Visual Basic .NET Public Sub EndScene()
C# public void EndScene();
Managed C++ public: void EndScene();
JScript .NET public function EndScene();

Remarks

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.

Exceptions
InvalidCallException The method failed because EndScene was called before BeginScene.


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center