justinstenning / Direct3DHook

DirectX Capture and Overlays by using Direct3D API hooks
http://spazzarama.com/2011/03/14/c-screen-capture-and-overlays-for-direct3d-9-10-and-11-using-api-hooks
MIT License
580 stars 178 forks source link

Font Ghosting/Crashing #29

Closed Icehunter closed 8 years ago

Icehunter commented 8 years ago

My Repo: https://github.com/Icehunter/ffxivapp-hooker

That is a combined implementation between your library and the one stored in: https://github.com/HearthstoneTracker/HearthstoneTracker

I've removed some extra files and tried to go back to as much of the basic that I can.

I've got the font rendering now without any issues and I'll be working on your overlay engine as well (that's another thing all together).

I have two issues with mine currently that I can't explain.

Ghosting as seen here: directx-ghosting

The top left smaller one is the original.

Occasional crashing when switching between full screen/windowed but with no consistent behavior.

Is this something you've seen or anyone else viewing this issue?

Ironically while in-game sometimes the FPS will lock itself to an NPC name and even if I rotate the camera it sicks with the NPC. Down the road that would be awesome to do on purpose, like drawing an arrow in the direction to run to avoid something.

Thanks for your hard work!

joshuateveryday commented 8 years ago

There are two problems you're going to have.

The code written for the screenshot app does not manage DirectX State, or hook the functions required to.

Capture Current Render State https://msdn.microsoft.com/en-us/library/windows/desktop/bb205890(v=vs.85).aspx

Once you have the current render state captured, you need to reset the render state, draw you content, then restore the saved render state.

Managed pipes via IPC servers are slow. They're going to affect your application strongly. If you try to do anything close to real-time updating, you're going to see major performance problems. The best way is to inject your DLL and have it running logic on its own application thread.

Icehunter commented 8 years ago

Gave up on DX9 :) Using DX11 only now and it seems the DLL is not getting removed from the process properly so after 2-3 host restarts the game will crash. Has anyone come across something like that?

Icehunter commented 8 years ago

New version of EasyHook fixed.