FreeGLUT spaceball patch

John Tsiombikas nuclear@mutantstargoat.com

16 October 2009

The original GLUT library used to support some less well-known input devices under IRIX, such as the Spaceball, a true 3D input device which can be used to control all 6 degrees of freedom (3 axis of rotation and 3 axis of translation) simultaneously. Unfortunately, nowadays, the more "exotic" input callbacks of GLUT such as the spaceball are left unimplemented.

So, yesterday I sat down and implemented the missing spaceball bits of FreeGLUT, which is the most widely used free GLUT implementation.

To avoid adding any extra dependencies to freeglut, I just ripped the relevant code from libspnav, which is part of my free spacenav driver project, and added it directly into freeglut.

Here's the patch against the current freeglut svn head, as well as instructions on how to check out freeglut and apply it.

I've also submitted it to the freeglut-devel mailing list, so hopefully they’ll merge it and we'll have spaceball input callbacks available with the prepackaged glut that comes with any GNU/Linux distribution in the future.


This was initially posted in my old wordpress blog. Visit the original version to see any comments.


Discuss this post

Back to my blog