This documentation is archived and is not being maintained.

Device.EndScene Method

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

Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)

public void EndScene ()
public void EndScene ()
public function EndScene ()

Every call to BeginScene should eventually be followed by a call to EndScene before the display is updated with 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 BeginScene. The method failed because EndScene was called before BeginScene.

The following code example shows beginning and ending a scene.

protected override void OnPaint(PaintEventArgs eventg)
    device.Clear(ClearFlags.Target, Color.Black, 0.0f, 0);
    sprite.Draw(texture, Vector3.Empty, new Vector3(10, 10, 0), 0x00ffffff);

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Compact Framework

Supported in: 2.0