This is a temporary page to collect the source code needed as we move towards a version of the ActiveStereo software that's stable and tested enough to release.
Things that you will need for the current ("recent ATI") version of this trick:
sudo chown -R root:wheel PsychtoolboxKernelDriver.kext
sudo chmod -R 755 PsychtoolboxKernelDriver.kext
Then cross your fingers and:
sudo kextload Downloads/PsychtoolboxKernelDriver.kext
Things you might need:
nv
command with the '-o' parameter. It's a floating point number, positive or negative, near 0 that corrects for the difference between 120.0Hz and the actual refresh rate of your display. All you got to do is get close enough and the command will servo around a little. You'll find this to be graphics card + cable (DVI, HDMI or VGA) dependent.This current code has been tested on the ATI 5770 and 5870 cards as well as the 6750M graphics hardware in the most recent MacBook Pros; previous versions (included as alternative main-s in nv.c) have been known to work on pretty much every nvidia card we've seen in a Mac. On the one hand this code has run for, literally, several CPU years in various remote locations around the world; on the other it's a horrible, ugly piece of work. Not only does it use one whole core to do its thing, under high system load — when the nv
utility gets kicked off of its core — everything will start flickering. As far as I can tell we really ought to be doing this kind of timing sensitive work inside the kernel.
Finally, you'll need some code to actually run on OS X to produce something in stereo.
Obviously I like Field. First put Field into stereo mode:
defaults write com.openendedgroup.Field stereo 1
(or you can run Field from the command line with -stereo 1)
then:
canvas = makeFullscreenCanvas()
shader = makeShaderFromElement(_self)
mesh = meshContainer()
canvas.getBothEyes() << shader << mesh
with mesh:
for n in range(0, 10):
mesh ** mesh ** [Vector3(n,0,-n), Vector3(1+n,0,-n), Vector3(1+n,1,-n)]
canvas.camera.io_position=Vector3(0.1, 0.1, 0.1)
You can download this sheet here.
Apple actually have a piece of example code that does stereo.