FlightGear with quad buffered stereo

With my upcoming new headtracking driver for the vusix vr920 hmd it is likely that I manage to get the famous flight simulator FlightGear to work with it. This led me again to the problem that FlightGear does not work in quad buffered stereo, as  I described in my comment to FlightGEAR 2.0.0 on GENTOO.

One expects to enable stereoscopic mode in FlightGear starting it with the following line:


When starting flightgear this way, one gets the following console output and no stereoscopic view:

Warning: detected OpenGL error ‘invalid operation’ after RenderBin::draw(,)

Getting FlightGear to work with quad-buffered stereo

Doing some code analysis in OpenSceneGraph-2.8.0 I discovered the following lines of code in View.cpp:

osg::DisplaySettings* ds = osg::DisplaySettings::instance();
if (ds->getStereo())
case(osg::DisplaySettings::QUAD_BUFFER): traits->quadBufferStereo = true; break;
case(osg::DisplaySettings::HORIZONTAL_INTERLACE): traits->stencil = 8; break;
default: break;

It seems that the stereo context in FlightGear does not get initialized properly in WindowBuilder::makeDefaultTraits(bool stencil). Thus these lines have to be added to WindowBuilder.cxx. For convenience here is the patch against  FlightGear-2.0.0: flightgear-2.0.0-stereoscopic.patch (1281)

Perhaps some nice FlightGear developer can include this into upstream code. You have to use a professional graphics board that supports quad buffered stereo, like a NVIDIA Quadro FX or a Ati FireGL and proper display hardware, like shutter glasses, a HMD or a stereoscopic projection system, to benefit from it.

Problems remaining

When using the quad buffered stereo mode in flightgear there occur some graphics errors. These are not very annoying, but they are there. Some cockpit controls and other scene details contain yellow lines, like a wireframe,  which are not there when starting FlightGear in “normal” display mode. I suspect this to be another bug in FlightGear, which has still to be located. See the screenshots below for details. The problematic parts of the scenes are marked red. Especially the night pictures show the problem. This problem does not only exist in quad buffered stereo mode, but also in other stereo modes like HORIZONTAL_SPLIT.


FlightGear by day, quad-buffered stereo, with errors


FlightGgear by day, no stereo, without errors


FlightGear by night, quad-buffered stereo, with errors


FlightGear by night, no stereo, without errors

The Gentoo way

For gentoo users here is my overlay including the modified ebuild: flightgear-2.0.0-stereoscopic_overlay.tar.gz (1141) Download the modified overlay (including the patches) and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:


Then emerge flightgear and enjoy it in three dimensions.

Have fun


Tool to increase your alexa rank instantly

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

grep for pdfs

Did you ever miss the functionality to perform a full text search in multiple pdf files from the command line in linux?

With the linux command grep one can search for a given text in multiple files.  If you don´t know it already you can find some information about grep here.  Sadly it can not be used for searching in pdf files, which is certainly an important task. Imagine you have some thousand pdf files archived on your harddrive and you are looking fore some information contained in them. It is far to much work to open each of them in your pdf viewer and search for the needed information. In this situation a tool like grep is quite handy.

A few days ago I found the interesting tool pdfgrep. It works similar to grep, but can search in pdf files. You can download it from SourceForge. Then build pdfgrep from source.

For gentoo users, as usual there is a more easy way. I wrote a simple  ebuild for pdfgrep. You can download the  ebuild here: pdfgrep-1.1.ebuild (926)

To use the ebuild, just copy it to/usr/local/portage/app-text/pdfgrep/. You probably have to create the directory. Then run

ebuild /usr/local/portage/app-text/pdfgrep/pdfgrep-1.1.ebuild digest

Be sure to include the following line in your /etc/make.conf.


Afterwards just emerge pdfgrep.

Sadly pdfgrep is not capable of recursively searching complete directory structures like one can do with egrep -r. This would enable one to search complete pdf collections. Not a big problem. Just use the following line of code:

find -name “*.pdf”  -exec pdfgrep -C50 -Hni $1 ‘{}’ ‘;’

For convenient use place it into a script file:

echo “find -name \”*.pdf\”  -exec pdfgrep -C50 -Hni \$1 ‘{}’ ‘;'” > /usr/local/bin/pdfrgrep

And make it executable:

chmod +x /usr/local/bin/pdfrgrep

Now you can just cd to the directory of your pdf collection and search it by entering:

pdfgrep [searchterm]



1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

New version of the vr920 headtracking driver coming soon

Last year I published the first version of my linux headtracking driver for the VR920 HMD here. Currently I am working on a new driver version which will have the following additional features:

  • Multiple Protocols:
    -UDP multicast (as before)
    -UDP unicast (for flightgear connection and perhaps more)
    -mouse emulation (via uinput)
    -joystick emulation (via uinput)
    -character device for direct angle readings (via cuse, will
    require a kernel >= 2.6.31)
  • Inverting of axes (to have moving the head up making the mouse pointer up or down, depending on needs)
  • Better filtering algorithm (more stable headtracking)
  • Scaling of data (i.e. to match screen size with mouse mode)
  • Customisable delay between sensor readings
  • User interface separated from the driver

With the upcoming MPX and the mouse emulation it should be possible to control the visible viewport by turning around the head. Controlling the view for games or other software that do not natively support headtracking should also be possible with the emulation.

In the current development stage most of the features are basically working so expect the new driver to be released soon.

Stay tuned for updates


1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)