PDA

View Full Version : 'stealing' rendering context



ScottManDeath
02-12-2002, 01:59 AM
Hi

please don't take the following to serious ;-)
I have following idea:

1. Run Unreal Tournament or another OPenGL game
2. find the window from that game using win32api --> getting HWND
3. get DC from that HWND
4. get HGLRC from DC using WGL
5. in my apps main loop making the stolen HGLRC active and for example set the polygonmode to line

I don't know wether this would work or wether this would be useful(I haven't had the time for coding), its just some brain fun

Bye
ScottManDeath

dorbie
02-12-2002, 02:47 AM
You can't do this. The approach for writing cheats like this is to wrap the openGL library. So you write your own opengl dll, pass through all the calls to the real opengl dll and intercept the few you want or at least make appropriate modifications to the graphics state as the application calls through to OpenGL.

ScottManDeath
02-12-2002, 03:04 AM
Hi

Perhaps you can tell me why this wouldnt work.I can imagine that all wgl* functions refer to the current threads HGLRC. Is that that reason ?

The faking opengl32.dll approach sounds interesting, maybe I'll try it when I have more time (nasty exams ;-( )

Thanks
ScottManDeath

lobstah
02-12-2002, 04:35 AM
You should write your own opengl app and try it; giving it a go with someone else's intellectual property is illegal as it could be interpreted as a form reverse engineering.

Just a thought.

dorbie
02-12-2002, 10:50 AM
This is not reverse engineering although this kind of approach could be used for that, but what are you going to reverse engineer? Their low level OpenGL code? It's worthless! Go ahead and do this, nobody cares unless you steal models (already in documented formats in files) or write cheats which spoil the game (already been done). Anything else there has been explained and done better by others on these boards. Intel already sells an OpenGL developers product which goes WAY beyond anything proposed here, it measures almost everything of interest, records stats and has many rendering modes to show depth complexity, meshes by color, primitive types by color, dispatch methods etc.


[This message has been edited by dorbie (edited 02-12-2002).]

Michalek366
02-15-2002, 02:32 AM
hmmm....

And I am wondering, what does the glDebugEntry() do.

[This message has been edited by Michalek366 (edited 02-15-2002).]

ScottManDeath
02-15-2002, 04:05 AM
Originally posted by Michalek366:
And I am wondering, what does the glDebugEntry() do.


Should I understand this ?

Bye
ScottManDeath

Michalek366
02-18-2002, 04:02 AM
http://www.opengl.org/discussion_boards/ubb/smile.gif

opengl32.dll has an entry called glDebugEntry (). It takes 4 parameters. This function isnt documented. So my question is:

What does it do?

opla
02-18-2002, 05:17 AM
According to http://apollo.iwt.uni-bielefeld.de/~ml_robot/OpenGL-07-2000/0030.html, it's only two parameters
glDebugEntry(DWORD dwArg1, DWORD dwArg2)