Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


OpenGL Hook

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Tue Apr 17, 2018 6:53 am    Post subject: OpenGL Hook Reply with quote

The Cheat Engine currently owns DirectX Hook, my suggestion is to add OpenGL Hook.
_________________
...
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Wed Apr 18, 2018 1:34 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Thu Apr 19, 2018 7:03 am    Post subject: Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Thu Apr 19, 2018 6:12 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites