Cocoa: Fix EGL support

This adds support for using GLFW with EGL backends on macOS.  While EGL
isn't available by default on macOS, there are third-party
implementations like SwiftShader.

The addition of MoltenVK support added an override to makeBackingLayer.
In non-Vulkan mode, this means that we are returning nil from that
function.  The NSGL implementation creates this layer manually later on,
but other OpenGL backends don't necessarily do that.

Closes #985.
This commit is contained in:
Konstantin Käfer 2017-04-06 16:00:09 +02:00 committed by Camilla Löwy
parent 85c6168bba
commit d1d08ef99f

View File

@ -423,6 +423,9 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
- (id)makeBackingLayer - (id)makeBackingLayer
{ {
if (!window->ns.layer) {
window->ns.layer = [super makeBackingLayer];
}
return window->ns.layer; return window->ns.layer;
} }