Class GameViewBase
Implements
Namespace: OpenTK
Assembly: cs.temp.dll.dll
Syntax
public abstract class GameViewBase : SurfaceView, IGameWindow
Constructors
GameViewBase(Context)
Declaration
public GameViewBase(Context context)
Parameters
Type | Name | Description |
---|---|---|
Context | context |
GameViewBase(Context, IAttributeSet)
Declaration
public GameViewBase(Context context, IAttributeSet attrs)
Parameters
Type | Name | Description |
---|---|---|
Context | context | |
IAttributeSet | attrs |
GameViewBase(IntPtr, Android.Runtime.JniHandleOwnership)
Declaration
public GameViewBase(IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | handle | |
Android.Runtime.JniHandleOwnership | transfer |
Properties
AutoResize
Controls whether the graphics context is recreated when the display size changes.
Declaration
public bool AutoResize { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Bounds
This member is not supported.
Declaration
public virtual Rectangle Bounds { get; set; }
Property Value
Type | Description |
---|---|
Rectangle | To be added. |
Remarks
Throws a System.NotImplementedException.
ClientRectangle
This member is not supported.
Declaration
public Rectangle ClientRectangle { get; set; }
Property Value
Type | Description |
---|---|
Rectangle |
Remarks
Throws a System.NotSupportedException.
ClientSize
This member is not supported.
Declaration
public Size ClientSize { get; set; }
Property Value
Type | Description |
---|---|
Size | To be added. |
Remarks
Throws a System.NotSupportedException.
Exists
This member is not supported.
Declaration
public bool Exists { get; }
Property Value
Type | Description |
---|---|
System.Boolean | To be added. |
Remarks
Throws a System.NotImplementedException.
Focused
This member is not supported.
Declaration
public bool Focused { get; }
Property Value
Type | Description |
---|---|
System.Boolean | To be added. |
Remarks
Throws a System.NotSupportedException.
GraphicsContext
Gets the IGraphicsContext instance bound to this AndroidGameView instance.
Declaration
public IGraphicsContext GraphicsContext { get; protected set; }
Property Value
Type | Description |
---|---|
IGraphicsContext | A IGraphicsContext instance bound to this AndroidGameView instance. |
Height
Declaration
public virtual int Height { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Location
This member is not supported.
Declaration
public virtual Point Location { get; set; }
Property Value
Type | Description |
---|---|
Point | To be added. |
Remarks
Throws a System.NotImplementedException.
Size
The size of the current view.
Declaration
public virtual Size Size { get; set; }
Property Value
Type | Description |
---|---|
Size | A System.Drawing.Size which is the size of the current view. |
Exceptions
Type | Condition |
---|---|
System.NotImplementedException |
Title
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Visible
Gets or sets a value specifying whether the view is visible.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A System.Boolean specifying whether the view is visible. |
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The instance has had OpenTK.Platform.Android.AndroidGameView.Dispose invoked on it. |
Width
Declaration
public virtual int Width { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
WindowBorder
Always returns Hidden.
Declaration
public virtual WindowBorder WindowBorder { get; set; }
Property Value
Type | Description |
---|---|
WindowBorder | A WindowBorder value controlling the border of the view. |
Remarks
Always returns Hidden.
The setter is ignored.
Exceptions
Type | Condition |
---|---|
System.NotImplementedException |
WindowInfo
Gets information about the containing window.
Declaration
public virtual IWindowInfo WindowInfo { get; }
Property Value
Type | Description |
---|---|
IWindowInfo | A IWindowInfo which provides information about the containing window. |
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The instance has had OpenTK.Platform.Android.AndroidGameView.Dispose invoked on it. |
WindowState
Gets or states the state of the view.
Declaration
public virtual WindowState WindowState { get; set; }
Property Value
Type | Description |
---|---|
WindowState | A WindowState value specifying the state of the window. |
Remarks
Normal is always returned.
Exceptions
Type | Condition |
---|---|
System.NotImplementedException |
X
This member is not supported.
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
Throws a System.NotSupportedException.
Y
This member is not supported.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
Throws a System.NotSupportedException.
Methods
Close()
Invokes the OpenTK.Platform.Android.AndroidGameView.OnClosed(System.EventArgs) event.
Declaration
public virtual void Close()
Remarks
This method only invokes the OpenTK.Platform.Android.AndroidGameView.OnClosed(System.EventArgs) method.
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The instance has had OpenTK.Platform.Android.AndroidGameView.Dispose invoked on it. |
CreateFrameBuffer()
Declaration
protected virtual void CreateFrameBuffer()
MakeCurrent()
Makes the OpenTK.Platform.Android.AndroidGameView.GraphicsContext current on the calling thread.
Declaration
public abstract void MakeCurrent()
Remarks
This method is equivalent to calling:
GraphicsContext.MakeCurrent(WindowInfo)
.
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The instance has had OpenTK.Platform.Android.AndroidGameView.Dispose invoked on it. |
OnClosed(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.Closed event.
Declaration
protected virtual void OnClosed(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
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.
OnClosed
in a derived class, be sure to
call the base class's OnClosed
method so that registered
delegates receive the event.
OnContextLost(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.ContextLost event.
Declaration
protected virtual void OnContextLost(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
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.
OnContextLost
in a derived class, be sure to
call the base class's OnContextLost
method so that registered
delegates receive the event.
OnContextSet(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.ContextSet event.
Declaration
protected virtual void OnContextSet(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
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.
OnContextSet
in a derived class, be sure to
call the base class's OnContextSet
method so that registered
delegates receive the event.
OnDisposed(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.Disposed event.
Declaration
protected virtual void OnDisposed(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
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.
OnDisposed
in a derived class, be sure to
call the base class's OnDisposed
method so that registered
delegates receive the event.
OnLoad(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.Load event.
Declaration
protected virtual void OnLoad(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
OnRenderFrame(FrameEventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.RenderFrame event.
Declaration
protected virtual void OnRenderFrame(FrameEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FrameEventArgs | e | An FrameEventArgs that contains the event data. |
Remarks
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.
OnRenderFrame
in a derived class, be sure to
call the base class's OnRenderFrame
method so that registered
delegates receive the event.
OnRenderThreadExited(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.RenderThreadExited event.
Declaration
protected virtual void OnRenderThreadExited(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
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.
OnRenderThreadExited
in a derived class, be sure to
call the base class's OnRenderThreadExited
method so that registered
delegates receive the event.
OnResize(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.Resize event.
Declaration
protected virtual void OnResize(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
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.
OnResize
in a derived class, be sure to
call the base class's OnResize
method so that registered
delegates receive the event.
OnTitleChanged(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.TitleChanged event.
Declaration
protected virtual void OnTitleChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
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.
OnTitleChanged
in a derived class, be sure to
call the base class's OnTitleChanged
method so that registered
delegates receive the event.
OnUnload(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.Unload event.
Declaration
protected virtual void OnUnload(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
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.
OnUnload
in a derived class, be sure to
call the base class's OnUnload
method so that registered
delegates receive the event.
OnUpdateFrame(FrameEventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.UpdateFrame event.
Declaration
protected virtual void OnUpdateFrame(FrameEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FrameEventArgs | e | An FrameEventArgs that contains the event data. |
Remarks
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.
OnUpdateFrame
in a derived class, be sure to
call the base class's OnUpdateFrame
method so that registered
delegates receive the event.
OnVisibleChanged(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.VisibleChanged event.
Declaration
protected virtual void OnVisibleChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
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.
OnVisibleChanged
in a derived class, be sure to
call the base class's OnVisibleChanged
method so that registered
delegates receive the event.
OnWindowStateChanged(EventArgs)
Raises the OpenTK.Platform.Android.AndroidGameView.WindowStateChanged event.
Declaration
protected virtual void OnWindowStateChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
Remarks
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.
OnWindowStateChanged
in a derived class, be sure to
call the base class's OnWindowStateChanged
method so that registered
delegates receive the event.
PointToClient(Point)
Declaration
public Point PointToClient(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point |
Returns
Type | Description |
---|---|
Point |
PointToScreen(Point)
Declaration
public Point PointToScreen(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point |
Returns
Type | Description |
---|---|
Point |
ProcessEvents()
This member is not supported.
Declaration
public void ProcessEvents()
Remarks
Throws a System.NotSupportedException.
Run()
Starts as-fast-as-possible run-loop processing.
Declaration
public abstract void Run()
Remarks
In this Run
overload, there is no delay between raising of the
OpenTK.Platform.Android.AndroidGameView.RenderFrame
event and the
OpenTK.Platform.Android.AndroidGameView.UpdateFrame
of the following frame; everything is executed as quickly as
possible. This may not be desirable.
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The instance has had OpenTK.Platform.Android.AndroidGameView.Dispose invoked on it. |
Run(Double)
Starts run-loop processing at a rate of updateRate
frames per second.
Declaration
public abstract void Run(double updateRate)
Parameters
Type | Name | Description |
---|---|---|
System.Double | updateRate | A System.Double containing the number of frames per second that should be updated and rendered. |
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The instance has had OpenTK.Platform.Android.AndroidGameView.Dispose invoked on it. |
SwapBuffers()
Swaps the front and back buffers of the current GraphicsContext, presenting the rendered scene to the user.
Declaration
public abstract void SwapBuffers()
Remarks
This method rebinds
OpenTK.Platform.Android.AndroidGameView.Renderbuffer
to the OpenGL context's RenderbufferOes
property, then
invokes SwapBuffers().
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException | The instance has had OpenTK.Platform.Android.AndroidGameView.Dispose invoked on it. |
Events
Closed
Occurs when the view has been closed.
Declaration
public event EventHandler<EventArgs> Closed
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
Closing
This member is not supported.
Declaration
public event EventHandler<CancelEventArgs> Closing
Event Type
Type | Description |
---|---|
System.EventHandler<CancelEventArgs> | To be added. |
Remarks
Throws a System.NotSupportedException.
ContextLost
Declaration
public event EventHandler<EventArgs> ContextLost
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
ContextSet
Occurs when the OpenTK.Platform.Android.AndroidGameView.GraphicsContext is created.
Declaration
public event EventHandler<EventArgs> ContextSet
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
Disposed
Occurs when the view is disposed
Declaration
public event EventHandler<EventArgs> Disposed
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
FocusedChanged
This member is not supported.
Declaration
public event EventHandler<EventArgs> FocusedChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> | To be added. |
Remarks
Throws a System.NotSupportedException.
Load
Occurs before the run loop starts.
Declaration
public event EventHandler<EventArgs> Load
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
Remarks
When using the run-loop processing architecture, events happen in the following order:
-
Load
- OpenTK.Platform.Android.AndroidGameView.UpdateFrame
- OpenTK.Platform.Android.AndroidGameView.RenderFrame
- OpenTK.Platform.Android.AndroidGameView.Unload
Run() and Run(Double), invoke OpenTK.Platform.Android.AndroidGameView.Load before starting the OpenTK.Platform.Android.AndroidGameView.UpdateFrame/OpenTK.Platform.Android.AndroidGameView.RenderFrame loop which is invoked for every rendered frame.
Stop() ends the OpenTK.Platform.Android.AndroidGameView.UpdateFrame/OpenTK.Platform.Android.AndroidGameView.RenderFrame loop processing, then invokes the OpenTK.Platform.Android.AndroidGameView.Unload event.
MouseEnter
This member is not supported.
Declaration
public event EventHandler<EventArgs> MouseEnter
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
Remarks
Throws a System.NotSupportedException.
MouseLeave
This member is not supported.
Declaration
public event EventHandler<EventArgs> MouseLeave
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
Remarks
Throws a System.NotSupportedException.
Move
This member is not supported.
Declaration
public event EventHandler<EventArgs> Move
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> | To be added. |
Remarks
Throws a System.NotSupportedException.
RenderFrame
Occurs part of run-loop processing when a frame should be rendered.
Declaration
public event EventHandler<FrameEventArgs> RenderFrame
Event Type
Type | Description |
---|---|
System.EventHandler<FrameEventArgs> |
Remarks
When using the run-loop processing architecture, events happen in the following order:
- OpenTK.Platform.Android.AndroidGameView.Load
- OpenTK.Platform.Android.AndroidGameView.UpdateFrame
-
RenderFrame
- OpenTK.Platform.Android.AndroidGameView.Unload
Run() and Run(Double), invoke OpenTK.Platform.Android.AndroidGameView.Load before starting the OpenTK.Platform.Android.AndroidGameView.UpdateFrame/OpenTK.Platform.Android.AndroidGameView.RenderFrame loop which is invoked for every rendered frame.
Stop() ends the OpenTK.Platform.Android.AndroidGameView.UpdateFrame/OpenTK.Platform.Android.AndroidGameView.RenderFrame loop processing, then invokes the OpenTK.Platform.Android.AndroidGameView.Unload event.
RenderThreadExited
Occurs when the separate rendering thread exits without cancelation request.
Declaration
public event EventHandler<EventArgs> RenderThreadExited
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
Resize
Occurs when the view's Size changes.
Declaration
public event EventHandler<EventArgs> Resize
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
TitleChanged
Occurs when the value of OpenTK.Platform.Android.AndroidGameView.Title changes.
Declaration
public event EventHandler<EventArgs> TitleChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
Unload
Occurs when the run-loop is terminated.
Declaration
public event EventHandler<EventArgs> Unload
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
Remarks
When using the run-loop processing architecture, events happen in the following order:
- OpenTK.Platform.Android.AndroidGameView.Load
- OpenTK.Platform.Android.AndroidGameView.UpdateFrame
- OpenTK.Platform.Android.AndroidGameView.RenderFrame
-
Unload
Run() and Run(Double), invoke OpenTK.Platform.Android.AndroidGameView.Load before starting the OpenTK.Platform.Android.AndroidGameView.UpdateFrame/OpenTK.Platform.Android.AndroidGameView.RenderFrame loop which is invoked for every rendered frame.
Stop() ends the OpenTK.Platform.Android.AndroidGameView.UpdateFrame/OpenTK.Platform.Android.AndroidGameView.RenderFrame loop processing, then invokes the OpenTK.Platform.Android.AndroidGameView.Unload event.
UpdateFrame
Occurs part of run-loop processing when a frame should be updated prior to rendering.
Declaration
public event EventHandler<FrameEventArgs> UpdateFrame
Event Type
Type | Description |
---|---|
System.EventHandler<FrameEventArgs> |
Remarks
When using the run-loop processing architecture, events happen in the following order:
- OpenTK.Platform.Android.AndroidGameView.Load
-
UpdateFrame
- OpenTK.Platform.Android.AndroidGameView.RenderFrame
- OpenTK.Platform.Android.AndroidGameView.Unload
Run() and Run(Double), invoke OpenTK.Platform.Android.AndroidGameView.Load before starting the OpenTK.Platform.Android.AndroidGameView.UpdateFrame/OpenTK.Platform.Android.AndroidGameView.RenderFrame loop which is invoked for every rendered frame.
Stop() ends the OpenTK.Platform.Android.AndroidGameView.UpdateFrame/OpenTK.Platform.Android.AndroidGameView.RenderFrame loop processing, then invokes the OpenTK.Platform.Android.AndroidGameView.Unload event.
VisibleChanged
Occurs when the value of Visible changes.
Declaration
public event EventHandler<EventArgs> VisibleChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
WindowBorderChanged
This member is not supported.
Declaration
public event EventHandler<EventArgs> WindowBorderChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> | To be added. |
Remarks
Throws a System.NotSupportedException.
WindowStateChanged
Occurs when the value of WindowState changes.
Declaration
public event EventHandler<EventArgs> WindowStateChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
Explicit Interface Implementations
INativeWindow.Cursor
Declaration
MouseCursor INativeWindow.Cursor { get; set; }
Returns
Type | Description |
---|---|
MouseCursor |
INativeWindow.CursorVisible
Declaration
bool INativeWindow.CursorVisible { get; set; }
Returns
Type | Description |
---|---|
System.Boolean |
INativeWindow.Icon
Declaration
Icon INativeWindow.Icon { get; set; }
Returns
Type | Description |
---|---|
Icon |
INativeWindow.IconChanged
Declaration
event EventHandler<EventArgs> INativeWindow.IconChanged
Returns
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
INativeWindow.KeyPress
This member is not supported.
Declaration
event EventHandler<KeyPressEventArgs> INativeWindow.KeyPress
Returns
Type | Description |
---|---|
System.EventHandler<KeyPressEventArgs> |
Remarks
Throws a System.NotSupportedException.
INativeWindow.PointToClient(Point)
Declaration
Point INativeWindow.PointToClient(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point |
Returns
Type | Description |
---|---|
Point |
INativeWindow.PointToScreen(Point)
Declaration
Point INativeWindow.PointToScreen(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point |
Returns
Type | Description |
---|---|
Point |