Compartir a través de


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

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

Definition

Visual Basic Public Sub EndScene()
C# public void EndScene();
C++ public:
void EndScene();
JScript 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.