Fixed all OpenGL issues for Macos (via objective-C++ layer)