コード例 #1
0
ファイル: TestGame.cs プロジェクト: CodesWilliam/2DEngine
 protected override void Update()
 {
     //testing the input system and changing colors via button press on the keyboard.
     if (Input.GetKeyDown(OpenTK.Input.Key.G))
     {
         RenderingSystem.SetClearColor(0, 1);  //sets to green
     }
     else if (Input.GetKeyDown(OpenTK.Input.Key.B))
     {
         RenderingSystem.SetClearColor(0, 0, 1);     //sets to blue
     }
     else if (Input.GetKeyDown(OpenTK.Input.Key.R))
     {
         RenderingSystem.SetClearColor(1);       //sets to red
     }
 }
コード例 #2
0
ファイル: Game.cs プロジェクト: CodesWilliam/2DEngine
 protected override void OnRenderFrame(FrameEventArgs e)
 {
     RenderingSystem.ClearScreen();
     Render();
     SwapBuffers();
 }
コード例 #3
0
ファイル: Game.cs プロジェクト: CodesWilliam/2DEngine
 protected override void OnLoad(EventArgs e)
 {
     Initialize();
     RenderingSystem.Init(1);     //Red clear color
 }