Use OpenGL 3 and adapt for OS X usage.
Merge pull request #100 from Waldteufel/osx

Use OpenGL 3 and adapt for OS X usage