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 


How can I draw inside of an OpenGL game using hooks?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
False Prophet
Expert Cheater
Reputation: -1

Joined: 28 May 2006
Posts: 121

PostPosted: Tue Jan 04, 2011 7:51 am    Post subject: How can I draw inside of an OpenGL game using hooks? Reply with quote

I'm wanting to draw a simple shape inside of an OpenGL game(Quake 3 engine) using SetWindowsHookEx, is this even possible? If so how do I accomplish it?
_________________
Back to top
View user's profile Send private message
AhMunRa
Grandmaster Cheater Supreme
Reputation: 27

Joined: 06 Aug 2010
Posts: 1117

PostPosted: Tue Jan 04, 2011 11:45 am    Post subject: Reply with quote

Sounds like you are looking to make bounding box or the like. http://www.morrowland.com/apron/tut_gl.php
_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.>
Back to top
View user's profile Send private message
False Prophet
Expert Cheater
Reputation: -1

Joined: 28 May 2006
Posts: 121

PostPosted: Tue Jan 04, 2011 2:01 pm    Post subject: Reply with quote

I was going with something much more simple such as a 2D solid color rectangle. Embarassed

Oh and I'm not trying to write an openGL game, I want to draw a rectangle ontop of for example, Quake 3 using some sort of hook if its possible.

_________________
Back to top
View user's profile Send private message
AhMunRa
Grandmaster Cheater Supreme
Reputation: 27

Joined: 06 Aug 2010
Posts: 1117

PostPosted: Tue Jan 04, 2011 4:18 pm    Post subject: Reply with quote

Quake uses OpenGL and it is possible to do what you want, but you will need to hook into the OpenGL lib. Or create your own overlay, of which if your game is using OpenGL you will need to snag draw coords from OpenGL calls. I'd suggest using OpenGL to do the actual drawing, not sure if you could use DirectX on top of OpenGL.

Check out that link I posted for you. Should be alot of what you need.

_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.>
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Jan 04, 2011 5:43 pm    Post subject: Reply with quote

Quake3 uses vertex arrays for its drawing afaik, you are probably looking for one of the glDrawElements() family functions or glDrawArrays().

Vertex buffers weren't around then and immediate mode was suicide so I'm guessing it's one of those that you want to hook.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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