q2vr/quake2vr — pull request #21 by jspenguin (2014-10-26 21:11:59+00:00)
Title: Add Linux support back in and upgrade Oculus SDK support to 0.4.3

Since 0.4.3 supports Linux, I fixed the Linux support and upgraded the Oculus SDK.

The only changes necessary in the VR code were to change ViewAdjust to HmdToEyeViewOffset and to rotate the coordinates if the screen height is greater than the width (since on Linux, Oculus does not recommend rotating the display). I added the ability to load the Oculus library dynamically since the Linux SDK builds a dynamic library by default.

I also fixed a few bugs related to 64-bit support (e.g. assuming sizeof(long) == sizeof(int)).

Instead of trying to fix the old Linux Makefile, I just removed it and started from scratch using CMake. The library names it links with are hardcoded, however.

It should still compile on Windows, since the only changes I made were guarded by #ifndef _WIN32. I haven't tested it, though.