?
Solved

Hook OpenGL API calls to aquire x,y coordinates of an object?

Posted on 2004-09-12
3
Medium Priority
?
338 Views
Last Modified: 2013-12-26
I'm trying to aquire the x and y coordinates of say a peasant, or a building in Warcraft III. I have a handle to the warcraft window and can simulate mouse movement and clicks as well as keyboard input. My question is how can I figure out the x,y coordinates of objects ( building, units etc. )? Would windows hooks be adequate in this situation? If someone couldpost an example of doing something like this i would be very much appreciative.
0
Comment
Question by:zekard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 17

Expert Comment

by:davebytes
ID: 12047238
Not that I know of.  The underlying data is all proprietary and hidden away -- there isn't anything that would allow you to figure out what is onscreen.  Sorry.

-d
0
 
LVL 17

Accepted Solution

by:
davebytes earned 300 total points
ID: 12096204
Even moved, still the same answer.  A given triangle rendered through openGL could be anything.  A triangle fan or list could be anything.  You'd basically have to write a complete stub OpenGL DLL, with EVERY call captured that has to do with primary data state (texture, shader, rendering, etc), and empirically try to mouse around the screen and use what was captured last frame to tell you what data seems to be attached.

However, since there's no guarantee that the texture IDs will remain the same between any two runs, you again can't realistically do this.  Also, if they've at all combined texture maps, or use shaders, it becomes difficult in many cases to separate out what is the 'key' data for a triangle being rendered.

And the speed slowdown for patching critical calls, buffering up ALL the data for the last frame, is going to be huge.

-d
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question