/simple-gl-evdev

A not-so simple DRM / Evdev / OpenGL ES 2.x moving cursor example

Primary LanguageCMIT LicenseMIT

Tipping

Pledgie ! Tip with Altcoins

About

A not-so-small example showing how to use DRM (KMS), OpenGL ES 2 and Evdev to control a software cursor.

The point is to show how to capture input with Evdev, and show the results in an DRM-driven OpenGL application.

Software cursors are inherently bad, as they're limited by the current application refresh rate, but are still nice when it comes to show input feedback.

Requirements

  • CMake
  • DRM (kernel drivers, libraries and development headers)
  • Evdev (kernel drivers, libraries and development headers)
  • GBM (libraries and development headers)
  • OpenGL ES 2.x (drivers, libraries and development headers)
  • A user that has the rights to read raw input data from Mouse input node.

Build

To build this project, do something like :

cd /tmp
git clone https://gitlab.com/Miouyouyou/simple-gl-evdev
mkdir build-glev
cmake ../simple-gl-evdev
make

You can then run ./Program to run the program. If the program complains about a missing mouse, check that a mouse is clearly plugged in and that your user can read raw input data, from the /dev/input/ node representing your mouse. You can also run the program as root, but this is ill-advised.

Thanks to

License

MIT