
GLIntercept – An OpenGL function call interceptor for Windows - rocky1138
https://github.com/dtrebilco/glintercept
======
kaoD
> GLIntercept works by overriding the call to wglGetProcAddress, wrapping the
> real function pointer in some assembly and then returning it to the
> application being debugged.

I used to code Counter-Strike cheats for fun[0] back in the 1.6 era and this
is how the simplest ones worked. For example, wallhack hooked glBegin and, if
the mode was GL_TRIANGLE_STRIP or GL_TRIANGLE_FAN (used for models mostly), it
disabled GL_DEPTH_TEST which in turn rendered models over the walls.

More advanced cheats needed to hook onto the game code to extract information
from memory and call/intercept game functions, but it was mostly the same.

There was a thriving community where all kind of information was shared,
including how to bypass anticheat programs, but it died in an incident long
after I was gone (I miss you, GameDeception).

Very fun memories :)

[0] Really. I never shared any of those cheats or used them online. It was
just the fun of learning how a system was made and _then_ breaking it.

~~~
andrewmcwatters
Wait, gamedeception is no longer around?? :(

~~~
kaoD
Whoops, I missed your reply (and you'll probably miss mine).

Apparently so. I just went there one day and it was gone. There were rumors
like a fit of rage or the owner no longer wanting to be associated with cheat
coding, but as an outsider to the scene I really don't know what happened.

------
pronoiac
"GLIntercept is a OpenGL function call interceptor for Windows that will
intercept and log all OpenGL calls"

~~~
Animats
Then what? What do you do with a log of OpenGL calls? Replay them to get
screen captures? Send in really long game bug reports? Insert ads into games?

~~~
santaclaus
Extract assets -- might be easier to do it by intercepting OpenGL calls than
by reverse engineering some proprietary binary format.

Edit: There are entire online communities dedicated to pulling assets out of
old games, for who knows what reasons. A buddy of mine from school would spend
entire weekends dumping assets from classic GameCube titles -- he would
occasionally render up scenes from old Zelda games with global illumination
and fancy material shaders, which were always kind of cool.

------
jzl
_" GLIntercept has existed since 2003 and was mainly designed as an OpenGL
1.0-2.1 debugger. So while basic function logging should work on all OpenGL
versions, the more advanced features listed below may or may not work in
OpenGL 3.0+. (especially when using a core OpenGL profile)"_

I've never used GLIntercept, but the above caveat sounds like it's not really
usable with modern graphics apps, like any non-trivial game.

But there are other similar tools that do and have all the same features or
more. To be fair, the GLIntercept readme provides a list of such tools right
at the bottom. The first item in that list, renderdoc, is something I've used
a lot and is _very_ feature rich and supports GL, DX, and Vulkan.

------
payloadd
For a OpenGL interception keeping up with modern OpenGL APIs use apitrace:
[https://apitrace.github.io/](https://apitrace.github.io/)

------
em_
With GLIntercept we created an early Augmented Reality prototype with
Macromedia Director. We just replaced a certain background texture with the
camera stream.

------
bitwize
Punishable by jail time in South Korea.

