Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
GLIntercept – An OpenGL function call interceptor for Windows (github.com/dtrebilco)
57 points by rocky1138 on Dec 4, 2016 | hide | past | favorite | 15 comments


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


Wait, gamedeception is no longer around?? :(


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.


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


Ah. For the people who check the comments first!


Like myself. Thanks, 'pronoiac!

EDIT:

I started thinking why do I pretty much always check HN comments first. Besides the obvious "HN comments often far outclass the original link", I came up with another reason - when I open HN, I usually skim the frontpage while quickly firing up comments for each interesting submission in a separate tab. Opening comment threads instead of submission links ensure that each new tab is a lightweight bookmark, with predictable loading time, close to zero resource consumption, and no bullshit like autoplaying video ads.


Yeah, sorry about that! I don't know what to put for the title when linking to Github repos, since HN traditionally frowns upon editorializing submission titles.


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?


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.


I've used this in the past to see how AAA games implement various graphic effects. It lets me see the textures, shader's and building of the various buffers (back, depth, etc) for an individual frame of the game. This is a great tool for learning exactly how games are put together graphically.


Debugging would be my first guess.


"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.


For a OpenGL interception keeping up with modern OpenGL APIs use apitrace: https://apitrace.github.io/


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


Punishable by jail time in South Korea.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: