Skip to content

Instantly share code, notes, and snippets.

@usagi
Last active August 29, 2015 13:59
Show Gist options
  • Select an option

  • Save usagi/10565582 to your computer and use it in GitHub Desktop.

Select an option

Save usagi/10565582 to your computer and use it in GitHub Desktop.
#include <GL/glut.h>
#include <iostream>
auto main() -> int
{
int number_of_arguments = 0;
glutInit(&number_of_arguments, nullptr);
glutCreateWindow("glut key test");
glutKeyboardFunc([](unsigned char key, int x, int y){ std::cerr << +key << " " << x << " " << y << "\n"; });
glutMainLoop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment