Edytuj

Udostępnij za pośrednictwem


iPhoneOSGameView.Run Method

Definition

Overloads

Run()

Starts as-fast-as-possible run-loop processing.

Run(Double)

Starts run-loop processing at a rate of updatesPerSecond frames per second.

Run(Int32)
Obsolete.

Run()

Starts as-fast-as-possible run-loop processing.

public void Run ();
abstract member Run : unit -> unit
override this.Run : unit -> unit

Implements

Exceptions

The instance has had Dispose(Boolean) invoked on it.

Remarks

Invokes CreateFrameBuffer(), raises the Load event, then begins run-loop processing. Run-loop processing consists of the following step (which happens for each frame):

  1. The UpdateFrame event is raised.
  2. The OpenGL frame buffer is re-bound to Framebuffer.
  3. The RenderFrame event is raised.

Run-loop processing should not be used if a persistant layer is used (i.e. LayerRetainsBacking is false); the entire view should need to be re-rendered on every frame.

In this Run overload, there is no delay between raising of the RenderFrame event and the UpdateFrame of the following frame; everything is executed as quickly as possible. This may not be desirable.

Applies to

Run(Double)

Starts run-loop processing at a rate of updatesPerSecond frames per second.

public void Run (double updatesPerSecond);
abstract member Run : double -> unit
override this.Run : double -> unit

Parameters

updatesPerSecond
Double

A T:System.Double containing the number of frames per second that should be updated and rendered.

Implements

Exceptions

updatesPerSecond is less than 0.

The instance has had Dispose(Boolean) invoked on it.

Remarks

If updatesPerSecond is 0.0, then Run() is invoked and the method exits.

Invokes CreateFrameBuffer(), raises the Load event, then begins run-loop processing. Run-loop processing consists of the following step (which happens for each frame):

  1. The UpdateFrame event is raised.
  2. The OpenGL frame buffer is re-bound to Framebuffer.
  3. The RenderFrame event is raised.

Run-loop processing should not be used if a persistant layer is used (i.e. LayerRetainsBacking is false); the entire view should need to be re-rendered on every frame.

Applies to

Run(Int32)

Caution

Use either Run (float updatesPerSecond) or RunWithFrameInterval (int frameInterval)

[System.Obsolete("Use either Run (float updatesPerSecond) or RunWithFrameInterval (int frameInterval)")]
public void Run (int frameInterval);
member this.Run : int -> unit

Parameters

frameInterval
Int32
Attributes

Applies to