C# Class OpenTK.GameViewBase

Inheritance: Android.Views.SurfaceView, IGameWindow
Datei anzeigen Open project: mono/opentk

Public Methods

Method 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.

Protected Methods

Method 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

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

Method Details

Close() public method

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
return void

CreateFrameBuffer() protected method

protected CreateFrameBuffer ( ) : void
return void

GameViewBase() public method

public GameViewBase ( IntPtr handle, global transfer ) : System
handle System.IntPtr
transfer global
return System

MakeCurrent() public abstract method

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
return void

OnClosed() protected method

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. ///
return void

OnContextLost() protected method

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. ///
return void

OnContextSet() protected method

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. ///
return void

OnDisposed() protected method

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. ///
return void

OnLoad() protected method

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

OnRenderFrame() protected method

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. ///
return void

OnRenderThreadExited() protected method

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. ///
return void

OnResize() protected method

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. ///
return void

OnTitleChanged() protected method

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. ///
return void

OnUnload() protected method

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. ///
return void

OnUpdateFrame() protected method

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. ///
return void

OnVisibleChanged() protected method

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. ///
return void

OnWindowStateChanged() protected method

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. ///
return void

PointToClient() public method

public PointToClient ( Point point ) : Point
point Point
return Point

PointToScreen() public method

public PointToScreen ( Point point ) : Point
point Point
return Point

ProcessEvents() public method

This member is not supported.

Throws a T:System.NotSupportedException.

public ProcessEvents ( ) : void
return void

Run() public abstract method

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
return void

Run() public abstract method

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. ///
return void

SwapBuffers() public abstract method

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
return void