Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to use ANGLE EGL #1169

Open
mumin16 opened this Issue Jan 4, 2018 · 10 comments

Comments

Projects
None yet
4 participants
@mumin16
Copy link

mumin16 commented Jan 4, 2018

for osx, i compiled google angle.
glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);

i have this error: GLFW Error: Cocoa: EGL not available

@elmindreda

This comment has been minimized.

Copy link
Member

elmindreda commented Jan 4, 2018

Seems your GLFW binary is too old to include EGL support on macOS. Try building a newer one from master.

@mumin16

This comment has been minimized.

Copy link
Author

mumin16 commented Jan 5, 2018

GLFW Error: EGL: Failed to create window surface: A NativeWindowType argument does not refer to a valid native window

@elmindreda

This comment has been minimized.

Copy link
Member

elmindreda commented Jan 9, 2018

Yay, that's definitely progress! Try changing the definition of _GLFW_EGL_NATIVE_WINDOW in cocoa_platform.h to

#define _GLFW_EGL_NATIVE_WINDOW  ((EGLNativeWindowType) window->ns.object)

and see if that helps.

@elmindreda elmindreda added the macOS label Jan 9, 2018

@elmindreda elmindreda self-assigned this Jan 9, 2018

@elmindreda elmindreda changed the title GLFW Error: Cocoa: EGL not available[but i have google angle] Failing to use ANGLE EGL Jan 9, 2018

@mumin16

This comment has been minimized.

Copy link
Author

mumin16 commented Jan 13, 2018

it is not work!

@mumin16

This comment has been minimized.

@Kangz

This comment has been minimized.

Copy link
Contributor

Kangz commented Jan 26, 2018

@mumin16 ANGLE's support for rendering to windows directly on OSX is extremely bad at the moment. It expects EGLNativeWindowType to be CALayer* and even then introduces extra blits, isn't vsynced etc.

Source: I'm the author of this crappy code and should fix it some day :)

@elmindreda

This comment has been minimized.

Copy link
Member

elmindreda commented Jan 27, 2018

@Kangz Thanks! Do you know if it will expect a CALayer in the future as well or switch to a window or view?

@Kangz

This comment has been minimized.

Copy link
Contributor

Kangz commented Jan 27, 2018

I think it will end up accepting both a CALayer or an NSView like Swiftshader. If you think an NSView is better I can make a patch to allow that.

@elmindreda

This comment has been minimized.

Copy link
Member

elmindreda commented Jan 30, 2018

@Kangz I'm fine with whatever variant lets us talk to most (all?) macOS EGL implementations.

@dougbinks

This comment has been minimized.

Copy link
Contributor

dougbinks commented Mar 3, 2019

FYI this came up in the following forum question along with a potential fix:

http://discourse.glfw.org/t/egl-and-opengl-es-on-mac/1281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.