I've created an C++ & OpenGL animation engine backed by GLX and GLEW, wrapped in a Node.js module via SWIG. The goal is to use the engine inside an Electron app in the browser process.
The engine appears quite stable. It's multi-context aware, binding the correct OpenGL context before all relevant operations, checking for errors after almost every possible operation, and backed by a rather large testing suite.
Outside of an electron app everything is working just fine. Mysteriously however, simple scripts that would normally work outside of Electron are failing inside an Electron app in either browser or renderer process.
glGenX
is returning 0glGetString(GL_VERSION)
returns null, afterward glGetError
returns no errorIn this order:
glXCreateContextAttribsARB
with a reasonable FB config. The returned value is non-zero.XSync(display, false)
is being called to wait for X errors. No errors are crashing the program, setting an X error handler yields no results.glXMakeCurrent
, no errors reported by glGetError
.glXIsDirect
.glewInit
, returning GLEW_OK
.I'm pretty baffled by this. Everything I'm checking appears to suggest the context was created correctly but it otherwise appears corrupted or dysfunctional.
What's going on? What else can I check?
https://github.com/electron/electron/issues/8848 reports exactly the issue of a null GL_VERSION and blames Electron version 1.6.1. The workaround was to roll back to version 1.4.15.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With