mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
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:
parent
85c6168bba
commit
d1d08ef99f
@ -423,6 +423,9 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||
|
||||
- (id)makeBackingLayer
|
||||
{
|
||||
if (!window->ns.layer) {
|
||||
window->ns.layer = [super makeBackingLayer];
|
||||
}
|
||||
return window->ns.layer;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user