Exemplo n.º 1
0
 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
     }
 }
Exemplo n.º 2
0
 protected override void OnRenderFrame(FrameEventArgs e)
 {
     RenderingSystem.ClearScreen();
     Render();
     SwapBuffers();
 }
Exemplo n.º 3
0
 protected override void OnLoad(EventArgs e)
 {
     Initialize();
     RenderingSystem.Init(1);     //Red clear color
 }