first part of OpenGL context work for OSX

Context is correctly created and the OpenGL calls no longer crash but it seems that I still have a buffer problem so nothing is shown on the screen.

Change-Id: Ia9cc585cd92c6049197dbfa47a41e30e130739ed