Skip to content

Commit

Permalink
Fixes OSX 10.14.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Walmsley authored and kekekeks committed Dec 7, 2018
1 parent f958278 commit 3cdc4ae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions native/Avalonia.Native/src/OSX/gl.mm
Expand Up @@ -208,9 +208,8 @@ virtual HRESULT GetScaling(double* ret) override

virtual ~AvnGlRenderingSession()
{
glFlush();
[_context flushBuffer];
[_context setView:nil];
[NSOpenGLContext clearCurrentContext];
CGLUnlockContext([_context CGLContextObj]);
[_view unlockFocus];
}
Expand Down Expand Up @@ -241,9 +240,8 @@ virtual HRESULT BeginDrawing(IAvnGlSurfaceRenderingSession** ret) override
auto gl = _context;
CGLLockContext([_context CGLContextObj]);
[gl setView: _view];
[gl update];
[gl makeCurrentContext];
auto frame = [_view frame];

*ret = new AvnGlRenderingSession(_window, _view, gl);
return S_OK;
}
Expand Down

0 comments on commit 3cdc4ae

Please sign in to comment.