-
Notifications
You must be signed in to change notification settings - Fork 282
PlatformError: GLX: Failed to make context current #68
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
Comments
This issue is my top priority. |
I managed to get the fix working using GLFW directly. This demonstrates that the issue is in fact the same as the one I had with flutter-desktop-embedding, and that the solution is to provide the flutter engine with the master...GeertJohan:feature/add-gl-proc-resolver It's not so nice that this makes the flutter Go package dependent on GLFW.h and libglfw. I believe that should remain the responsibility of go-gl/glfw. |
Yes, it should remain the responsibility of go-gl/glfw. |
I have added two more iterations.
I've created a PR at go-gl/glfw which makes the last iteration compile. When it's merged into master, I'll cleanup commit history and create a PR here. |
I'm seeing an issue that I've seen before. I know how it can be fixed, but I'm not succeeding in applying the fix to this project.
In flutter-desktop-embedding I encountered an error that was caused by improper resolving of GL functions. The Flutter>Skia>GL rendering would assume the wrong GL context and resolved the wrong procs, ending up in a bunch of errors. Providing flutter with a glfw proc resolver fixed the issue. This occurs on machines with multiple video cards (e.g.: intel graphics as part of the CPU and an nvidia card for when there's some actual GPU power required).
This issue was fixed in flutter-desktop-embedding by the following PR: google/flutter-desktop-embedding#184
I really like Go, have been working with it since before Go v 1.0. So obviously I wanted to try this project as well. I tried to rework the fix over for this project, but ran into a few issues.
First of all, the go-gl/glfw project doesn't expose
glfwGetProcAddress
.There's an open issue about it: go-gl/glfw#234
I tried to start patching this by using glfw directly. Not as a permanent solution, but just to try out the fix and create a use-case example for go-gl/glfw to expose
glfwGetProcAddress
.However, it's not working, compile warning on the proxy function I made, I'm probably doing something wrong in C land.The changes I made are visible here: master...GeertJohan:feature/add-gl-proc-resolver
The compile error on my feature branch:Edit: The quick'n'dirty fix works now. See comment below.
Note that I had to copy over some of the new fields and structs of the embedder API to get access to the
gl_proc_resolver
parameter.I hope we may be able to fix this, preferably by having
glfwGetProcAddress
exposed from the go-gl/glfw package. Any help is welcome.Flutter version
Does the prebuilt and portable version works ?
Steps to Reproduce
./main
)The text was updated successfully, but these errors were encountered: