C# Class Examples.Tutorial.SimpleWindow

Demonstrates the GameWindow class.
Inheritance: OpenTK.GameWindow
ファイルを表示 Open project: tpb3d/TPB3D Class Usage Examples

Public Methods

Method Description
Keyboard_KeyDown ( object sender, KeyboardKeyEventArgs e ) : void

Occurs when a key is pressed.

SimpleWindow ( ) : System

Protected Methods

Method Description
OnLoad ( EventArgs e ) : void

Setup OpenGL and load resources here.

OnRenderFrame ( FrameEventArgs e ) : void

Add your game rendering code here.

There is no need to call the base implementation.

OnResize ( EventArgs e ) : void

Respond to resize events here.

There is no need to call the base implementation.

OnUpdateFrame ( FrameEventArgs e ) : void

Add your game logic here.

There is no need to call the base implementation.

Private Methods

Method Description
Main ( ) : void

Method Details

Keyboard_KeyDown() public method

Occurs when a key is pressed.
public Keyboard_KeyDown ( object sender, KeyboardKeyEventArgs e ) : void
sender object The KeyboardDevice which generated this event.
e OpenTK.Input.KeyboardKeyEventArgs The key that was pressed.
return void

OnLoad() protected method

Setup OpenGL and load resources here.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnRenderFrame() protected method

Add your game rendering code here.
There is no need to call the base implementation.
protected OnRenderFrame ( FrameEventArgs e ) : void
e FrameEventArgs Contains timing information.
return void

OnResize() protected method

Respond to resize events here.
There is no need to call the base implementation.
protected OnResize ( EventArgs e ) : void
e System.EventArgs Contains information on the new GameWindow size.
return void

OnUpdateFrame() protected method

Add your game logic here.
There is no need to call the base implementation.
protected OnUpdateFrame ( FrameEventArgs e ) : void
e FrameEventArgs Contains timing information.
return void

SimpleWindow() public method

public SimpleWindow ( ) : System
return System