'stealing' rendering context

Hi

please don’t take the following to serious :wink:
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

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.

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

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.

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).]

hmmm…

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

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

Originally posted by Michalek366:
And I am wondering, what does the glDebugEntry() do.

Should I understand this ?

Bye
ScottManDeath

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

What does it do?

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)