4

I want to use Electron as a debug overlay for a Vulkan Render Engine im building. Since i have a lot of requirements on this debug tool writing one in engine myself would take way too long. I would like to use electron instead of Qt or similar since i feel its a lot more powerful and flexible with less effort (once its working).

The problem is now that i somehow either have to get my render output to electron or electrons output to my engine. As far as i can tell the easiest solution would be to copy the data back to cpu then transfer it. But that would be extremely slow and cost a lot of bandwidth. So i was wondering if there is a better solution.

I have two ideas to make it work but i didnt find any ways to implement them or even anyone talking about it.

The first would be to have electron configured to run on the gpu somehow get the handle for the output texture and importing it into my render engine using vulkan external memory. However as i have no experience with chromium and there doesnt seem to be anyone else that did it this i dont think it would work out to well.

The second idea was to do the opposite. Using a canvas element with webgl and again using vulkan external memory to copy the output of my engine to a texture and displaying it. I have full control over the draw process here so i think it would be a lot simpler and more stable. However again i found no way of setting up a webGL texture handle as an external memory object.

Is there any better way of doing this or some help on how to implement it?

CodingRays
  • 99
  • 6
  • Have you considered [ImGUI](https://github.com/ocornut/imgui)? It is a library that provides many of the widgets needed to implement UIs. The library generates a set of draw calls and resources that then you can render with your engine. – Kevin Spaghetti Jun 08 '23 at 16:26

0 Answers0