Issue metadata
Sign in to add a comment
|
Electron incompatible with independent OpenGL rendering
Reported by
alexande...@gmail.com,
Sep 5 2017
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36 Steps to reproduce the problem: 1. Create a simple Electron program with an included C++ module. 2. Create an OpenGL context in the C++ module under Electron. 3. Try to use the context in any way -- rendering with it, querying the version string, etc. What is the expected behavior? Context should be valid and usable. What went wrong? Context appears to be completely dysfunctional. Did this work before? Yes Electron 1.4.15 -- Not sure of chrome version Does this work in other browsers? Yes Chrome version: 59.0.3071.115 Channel: stable OS Version: Debian Flash Version: I would like to make an application with Electron, which embeds Chromium into a configurable Node.js app, but the community is running into this context problem on recent Electron releases. An issue was filed with Electron: https://github.com/electron/electron/issues/8848 However there is a belief that Chromium might be affecting external OpenGL contexts. Is this a problem that can be fixed by the Electron team or by the external C++ module developer? Or does it fall within Chromium's territory?
,
Sep 7 2017
Thanks for filing the issue. As this issue related to Electron program & C++ code related , could some one from dev team please look into this issue. Adding 'TE-NeedsTriageHelp' label for further investigation.
,
Oct 6 2017
piman@ could you weigh in on this? It sounds like the Electron folks need some guidance on how to share GL bindings.
,
Oct 6 2017
No idea how Electron runs the GPU code. If it's run out-of-process like in Chromium then there shouldn't really be any interaction, modulo platform-specific restrictions (e.g. trying to create more than one GLXDrawable out of a single X Window, but the GPU process creates a child window, so I'm not sure you'd run into that). If it's run in-process, then I think you're going to run into a huge ton of issues, I'm not really sure different GL bindings can coexist correctly in the same process. You can try using Chromium's GL bindings (#include "ui/gl/gl_bindings.h" instead of the native GL/gl.h and so on), but I have no idea how that interacts with GLFW. That said, the issues you describe in that Electron issues sound like your context becomes no-longer current, so running glXMakeCurrent on your context again at the appropriate time (not sure what that would be in Electron) may work. If you're just using Electron as a launcher, maybe also you can disable GPU in that config (run with --disable-gpu, though again I don't know how to do that in the Electron world). Either way, I don't think there is anything actionable from the Chromium side here. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by ligim...@chromium.org
, Sep 6 2017