ruby/CGL: explicitly set current OpenGL context

On builds made with Xcode 11+ the current OpenGL context wasn't being
properly configured anymore, resulting in shader compilation errors and
a red screen.

Explicitly calling makeCurrentContext fixes this.
This commit is contained in:
Sintendo 2019-12-23 21:33:33 +01:00
parent 748cf44f35
commit 526df86ee6
1 changed files with 1 additions and 0 deletions

View File

@ -145,6 +145,7 @@ private:
[view setWantsBestResolutionOpenGLSurface:YES];
[context addSubview:view];
[openGLContext setView:view];
[openGLContext makeCurrentContext];
[[view window] makeFirstResponder:view];
[view lockFocus];