opentk/opentk — pull request #151 by thefiddler (2014-07-16 14:09:29+00:00)
Title: [KMS] Implement Linux/KMS platform

This PR adds support for Linux/KMS, which allows OpenTK to run on a Linux VT console without an X11 server. This is meant for specialized applications that require increased timing accuracy, such as emulators, or increased performance, e.g. Raspberry Pi.

Features:
- OpenGL and OpenGL ES support through libEGL.
- Mouse/Keyboard support through libinput.
- Joystick support through /dev/input.
- DisplayDevice support through libdrm.

To test Linux/KMS, simply switch to a VT console by pressing Ctrl-Alt-F2 and run any OpenTK application. You can switch back to X11 by pressing Ctrl-Alt-F1 or Ctrl-Alt-F7. Please take a moment to read the known issues first. Also note that you can run any OpenTK example by typing the full name of the example. For instance:
```
cd opentk/Binaries/OpenTK/Debug
mono --debug Examples.Exe Examples.Tests.GameWindowStates
```

Limitations / known issues:
- This requires GPU driver with KMS support. Most open-source drivers, such as intel, radeon and nouveau, support KMS out of the box. Closed-source drivers, such as nvidia and fglrx will not work.
- libinput requires that the user has access /dev/event device nodes. Many distributions limit access to these nodes, so you may have to modify your account settings, or run your application as root with `sudo mono ...` (not recommended.)
- You can only create fullscreen, borderless GameWindows, with a window size identical to the size of the specified display. WinForms/GLControl is not supported.
- Multi-display configurations require additional testing.
- (Bug) After exiting the application, the monitor may turn blank. Switch to a different VT and back again to restore normal operation.