Oculus Rift + Python-Ogre


19-09-2013 03:49:21

Someone else wrote a C-API for the Oculus Rift https://github.com/OpenHMD/OpenHMD. I wrote a ctypes wrapper for that: https://github.com/cboulay/OpenHMD_ctypes.

This module works well in normal (i.e., non-ogre) Python programs. I can poll the device orientation at about 100 kHz for several minutes and it continues to report the updated information.
This module works similarly well in PyOpenGL applications.

However, when using it in Python-Ogre applications, the returned information stops updating after ~10 seconds. I can still poll the driver but it returns old information (i.e., the same values). In the simplest example, I edited python-ogre/demos/ogre/Demo_Basic.py and added a few lines of code to its `main` function to initialize the driver and poll it during the frame render loop.

Now, I know this is an obscure problem, to say the least, but I wonder if anyone here has any idea what is unique about Python-Ogre that would cause this?

In the meantime, I'll try to get this Python wrapper for the official SDK working: https://github.com/wwwtyro/pyrift.