C# Class OpenTK.GameViewBase

Inheritance: Android.Views.SurfaceView, IGameWindow
Afficher le fichier Open project: mono/opentk

Méthodes publiques

Méthode Description
Close ( ) : void

Invokes the M:OpenTK.Platform.Android.AndroidGameView.OnClosed(System.EventArgs) event.

This method only invokes the M:OpenTK.Platform.Android.AndroidGameView.OnClosed(System.EventArgs) method.

GameViewBase ( IntPtr handle, global transfer ) : System
MakeCurrent ( ) : void

Makes the P:OpenTK.Platform.Android.AndroidGameView.GraphicsContext current on the calling thread.

This method is equivalent to calling: GraphicsContext.MakeCurrent(WindowInfo).

PointToClient ( Point point ) : Point
PointToScreen ( Point point ) : Point
ProcessEvents ( ) : void

This member is not supported.

Throws a T:System.NotSupportedException.

Run ( ) : void

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

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

Run ( double updateRate ) : void

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

SwapBuffers ( ) : void

Swaps the front and back buffers of the current GraphicsContext, presenting the rendered scene to the user.

This method rebinds P:OpenTK.Platform.Android.AndroidGameView.Renderbuffer to the OpenGL context's RenderbufferOes property, then invokes M:OpenTK.Graphics.IGraphicsContext.SwapBuffers.

Méthodes protégées

Méthode Description
CreateFrameBuffer ( ) : void
OnClosed ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.Closed event.

The OnClosed method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnClosed in a derived class, be sure to call the base class's OnClosed method so that registered delegates receive the event.
OnContextLost ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.ContextLost event.

The OnContextLost method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnContextLost in a derived class, be sure to call the base class's OnContextLost method so that registered delegates receive the event.
OnContextSet ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.ContextSet event.

The OnContextSet method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnContextSet in a derived class, be sure to call the base class's OnContextSet method so that registered delegates receive the event. It is convenient place to create context related data, ie. load textures.
OnDisposed ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.Disposed event.

The OnDisposed method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnDisposed in a derived class, be sure to call the base class's OnDisposed method so that registered delegates receive the event.
OnLoad ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.Load event.

OnRenderFrame ( FrameEventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.RenderFrame event.

The OnRenderFrame method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnRenderFrame in a derived class, be sure to call the base class's OnRenderFrame method so that registered delegates receive the event.
OnRenderThreadExited ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.RenderThreadExited event.

The OnRenderThreadExited method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnRenderThreadExited in a derived class, be sure to call the base class's OnRenderThreadExited method so that registered delegates receive the event. It is convenient place to handle errors.
OnResize ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.Resize event.

The OnResize method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnResize in a derived class, be sure to call the base class's OnResize method so that registered delegates receive the event.
OnTitleChanged ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.TitleChanged event.

The OnTitleChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnTitleChanged in a derived class, be sure to call the base class's OnTitleChanged method so that registered delegates receive the event.
OnUnload ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.Unload event.

The OnUnload method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnUnload in a derived class, be sure to call the base class's OnUnload method so that registered delegates receive the event.
OnUpdateFrame ( FrameEventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.UpdateFrame event.

The OnUpdateFrame method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnUpdateFrame in a derived class, be sure to call the base class's OnUpdateFrame method so that registered delegates receive the event.
OnVisibleChanged ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.VisibleChanged event.

The OnVisibleChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnVisibleChanged in a derived class, be sure to call the base class's OnVisibleChanged method so that registered delegates receive the event.
OnWindowStateChanged ( EventArgs e ) : void

Raises the E:OpenTK.Platform.Android.AndroidGameView.WindowStateChanged event.

The OnWindowStateChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnWindowStateChanged in a derived class, be sure to call the base class's OnWindowStateChanged method so that registered delegates receive the event.

Private Methods

Méthode Description
GameViewBase ( Android.Content.Context context ) : System
GameViewBase ( Android.Content.Context context, global attrs ) : System
INativeWindow ( Point point ) : Point

Method Details

Close() public méthode

Invokes the M:OpenTK.Platform.Android.AndroidGameView.OnClosed(System.EventArgs) event.
This method only invokes the M:OpenTK.Platform.Android.AndroidGameView.OnClosed(System.EventArgs) method.
/// The instance has had /// /// invoked on it. ///
public Close ( ) : void
Résultat void

CreateFrameBuffer() protected méthode

protected CreateFrameBuffer ( ) : void
Résultat void

GameViewBase() public méthode

public GameViewBase ( IntPtr handle, global transfer ) : System
handle System.IntPtr
transfer global
Résultat System

MakeCurrent() public abstract méthode

Makes the P:OpenTK.Platform.Android.AndroidGameView.GraphicsContext current on the calling thread.

This method is equivalent to calling: GraphicsContext.MakeCurrent(WindowInfo).

/// The instance has had /// /// invoked on it. ///
public abstract MakeCurrent ( ) : void
Résultat void

OnClosed() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.Closed event.

The OnClosed method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnClosed in a derived class, be sure to call the base class's OnClosed method so that registered delegates receive the event.
protected OnClosed ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

OnContextLost() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.ContextLost event.

The OnContextLost method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnContextLost in a derived class, be sure to call the base class's OnContextLost method so that registered delegates receive the event.
protected OnContextLost ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

OnContextSet() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.ContextSet event.

The OnContextSet method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnContextSet in a derived class, be sure to call the base class's OnContextSet method so that registered delegates receive the event. It is convenient place to create context related data, ie. load textures.
protected OnContextSet ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

OnDisposed() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.Disposed event.

The OnDisposed method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnDisposed in a derived class, be sure to call the base class's OnDisposed method so that registered delegates receive the event.
protected OnDisposed ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

OnLoad() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.Load event.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

OnRenderFrame() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.RenderFrame event.

The OnRenderFrame method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnRenderFrame in a derived class, be sure to call the base class's OnRenderFrame method so that registered delegates receive the event.
protected OnRenderFrame ( FrameEventArgs e ) : void
e FrameEventArgs /// An that contains the event data. ///
Résultat void

OnRenderThreadExited() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.RenderThreadExited event.

The OnRenderThreadExited method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnRenderThreadExited in a derived class, be sure to call the base class's OnRenderThreadExited method so that registered delegates receive the event. It is convenient place to handle errors.
protected OnRenderThreadExited ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

OnResize() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.Resize event.

The OnResize method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnResize in a derived class, be sure to call the base class's OnResize method so that registered delegates receive the event.
protected OnResize ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

OnTitleChanged() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.TitleChanged event.

The OnTitleChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnTitleChanged in a derived class, be sure to call the base class's OnTitleChanged method so that registered delegates receive the event.
protected OnTitleChanged ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

OnUnload() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.Unload event.

The OnUnload method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnUnload in a derived class, be sure to call the base class's OnUnload method so that registered delegates receive the event.
protected OnUnload ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

OnUpdateFrame() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.UpdateFrame event.

The OnUpdateFrame method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnUpdateFrame in a derived class, be sure to call the base class's OnUpdateFrame method so that registered delegates receive the event.
protected OnUpdateFrame ( FrameEventArgs e ) : void
e FrameEventArgs /// An that contains the event data. ///
Résultat void

OnVisibleChanged() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.VisibleChanged event.

The OnVisibleChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnVisibleChanged in a derived class, be sure to call the base class's OnVisibleChanged method so that registered delegates receive the event.
protected OnVisibleChanged ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

OnWindowStateChanged() protected méthode

Raises the E:OpenTK.Platform.Android.AndroidGameView.WindowStateChanged event.

The OnWindowStateChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

When overriding OnWindowStateChanged in a derived class, be sure to call the base class's OnWindowStateChanged method so that registered delegates receive the event.
protected OnWindowStateChanged ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
Résultat void

PointToClient() public méthode

public PointToClient ( Point point ) : Point
point Point
Résultat Point

PointToScreen() public méthode

public PointToScreen ( Point point ) : Point
point Point
Résultat Point

ProcessEvents() public méthode

This member is not supported.

Throws a T:System.NotSupportedException.

public ProcessEvents ( ) : void
Résultat void

Run() public abstract méthode

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

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

/// The instance has had /// /// invoked on it. ///
public abstract Run ( ) : void
Résultat void

Run() public abstract méthode

Starts run-loop processing at a rate of updateRate frames per second.
/// The instance has had /// /// invoked on it. ///
public abstract Run ( double updateRate ) : void
updateRate double /// A containing the number of frames per /// second that should be updated and rendered. ///
Résultat void

SwapBuffers() public abstract méthode

Swaps the front and back buffers of the current GraphicsContext, presenting the rendered scene to the user.

This method rebinds P:OpenTK.Platform.Android.AndroidGameView.Renderbuffer to the OpenGL context's RenderbufferOes property, then invokes M:OpenTK.Graphics.IGraphicsContext.SwapBuffers.

/// The instance has had /// /// invoked on it. ///
public abstract SwapBuffers ( ) : void
Résultat void