Overlay Electron

2019-05-07 16:13发布

I am wondering if it is possible to overlay an application made in electron over a game. essentially similar to how steam overlays in games.

I want this because we have made a timer web app that times tasks and are debating making it an overlay if possible. to time certain events in games that reoccur

I have no idea if this can be achieved but it is something high on our list. Any example of how this can be achieved or has anyone done this before.

Thanks,

Kieran

1条回答
We Are One
2楼-- · 2019-05-07 16:45

To draw overlay in a game, you need hook Direct3D or OpenGL api according to which the game use.

And before present call(in D3D), you can draw your own stuff on a swapchain surface.

To control a overlay window in game, you need use Windows message hook and some other stuff.

And you should carefully manage all the windows in your program that draws in game.

There is a hook project Direct3DHook, it's written in C#, but it will be easy to write in C++.

If you want to write a good overlay engine, there will be plenty details to consider.

Overwolf is a overlay app platform, I write an overlay project at work which took about two month to be something approximate.

I have written a project, https://github.com/hiitiger/gelectron.

查看更多
登录 后发表回答