Add formula for direct frame buffer
Some adaptions to compile Qt on OS X, maybe