View previous topic :: View next topic |
Author |
Message |
Filipe_Br Master Cheater Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Tue Apr 17, 2018 6:53 am Post subject: OpenGL Hook |
|
|
The Cheat Engine currently owns DirectX Hook, my suggestion is to add OpenGL Hook.
_________________
... |
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
|
Posted: Wed Apr 18, 2018 1:34 pm Post subject: |
|
|
You can code one fairly easily. Direct3D and OpenGL hooking/wrappers are all over the net, open source and well documented on how they work. Integrating it with CE's features shouldn't take much effort either. Just follow how the DX Hook works and port things between the two languages as needed. (The rendering API setups are fairly similar and easily translated back and forth.)
_________________
- Retired. |
|
Back to top |
|
|
Filipe_Br Master Cheater Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Thu Apr 19, 2018 7:03 am Post subject: |
|
|
I know how DirectX 9 Hook and OpenGL Hook work. I've done this in C ++.
I figure out 3 ways to do this on the Cheat Engine:
1 - Modifying the source of the Cheat Engine (I think this is what you mean, I hope it is not the only way it works).
2 - Through a plugin for CE (How do I create a plugin?)
3 - Creating a dll, inject it using "injectDLL" and use its function with "executeCode".
4 - A Lua library written in another language (I do not know if it is possible)
Do you think all of these options can work?
_________________
... |
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8516 Location: 127.0.0.1
|
Posted: Thu Apr 19, 2018 6:12 pm Post subject: |
|
|
1. Would need to be done due to how DB coded the DirectX Mess dlls. You would need to add code to the d3d hook handler stuff to work with OpenGL, see here:
https://github.com/cheat-engine/cheat-engine/blob/master/Cheat%20Engine/d3dhookUnit.pas
2. Plugins could work but you would still have to code your own interfaces to work with how CE handles things like the textures and so on if you want it to work just like CE's stuff for D3D.
3. Is what you would be doing anyway, you just have to export the needed stuff. You can see how the DirectX Mess dlls are coded here:
https://github.com/cheat-engine/cheat-engine/tree/master/Cheat%20Engine/Direct%20x%20mess
4. Also possible, as you can write plugins for CE that alter the Lua state.
If your end goal is to make it work with the existing stuff in CE that works for the d3d stuff, you will have to alter the above .pas file I linked to work with your custom opengl dll that will be injected. The various D3D hook dlls that DB created are injected and export their hook implementations for the various drawing calls that are used. For working with OpenGL, the closest of the 3 d3d ones would be the d3d9 hook found here:
https://github.com/cheat-engine/cheat-engine/tree/master/Cheat%20Engine/Direct%20x%20mess/CED3D9Hook
The API between OpenGL and Direct3D8/Direct3D9 are pretty similar.
_________________
- Retired. |
|
Back to top |
|
|
|