Linux fixes and additions

Mainly OpenGL related fixes, open for review and testing.