How can I make a DirectX overlay for games?
(This isn't for making game hacks, if you're wondering.)
13 Replies
I feel like the winforms tag isn't appropriate for this question, as DX stuff is easily doable without winforms.
Also, there is a DirectX discord you could ask that question in for more detailed information.
I've done some DirectX work, but would not know how to add an overlay to an external DX application.
You could modify the render Queue of the app and draw ur stuft before or after the actual content. Not sure if this is good practice though
the easiest thing would probably be making a transparent window you put on top of the game and where you render on. if i find the time i can look up how i did it
Depends if u want to interact with the app itself (like displaying foreign stats) or if it is just an generic overlay
But then you get kicked out of direct-flip, and that won't work with exclusive fullscreen
true. i wonder how the game bar works bcuz it can overlay in full screen as well
Injection
Which is hard
but it can also render outside the window
Ah, that might require direct-composition perhaps?
<:PES_Think:639363477458255874>
i havent looked much into direct composition
It's also not like we can just ask steam how they did it
there are other
If u want to make it universal
For d3d9 u can copy the d3d Device vTable and copy it into ur pointer to access it. From there you could hook the end scene method and draw ur overlay
But if u want to support OpenGL, Vulkan and other dx versions that's anothet story
So doing it with injection is the most complicated way, depends on what ur goal is