I’m working on a C++ 3D engine that uses GLFW for cross-platform compatibility.
I now need to build some sort of editor UI to drive the engine. I was thinking of using Electron. But I’m not sure how to go about the integration or whether I’m even thinking about it in a sensical way.
In normal operation, my engine itself is responsible for creating a GL window to render to (via GLFW) and then rendering to the GLFWwindow’s buffer.
What I’d like to do is create an Electron-based app that has all UI elements of the “engine editor” (i.e. buttons, sliders, etc) but also a couple GL windows ‘inside’ the main Electron app window, where the engine renders as usual in response to the user’s interaction thru the Electron app.
I believe this will require that I write a Node.JS wrapper for the engine, which I know how to do. But I’m not sure how to ‘embed’ the GL windows that take rendering commands from the engine. Does that make sense?
In other words, assume the UI in the image included:
How would I embed those GL views inside the main window? Can those be native, aka not WebGL?
Should they be WebGL? If so how can my engine render into those via the native GL API as opposed to WebGL?