Solved

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

Posted on 2004-09-12
3
290 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
  • 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 100 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

912 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now