Detecting if an OpenGL debugger is being used

Is there any way of detecting from my OpenGL application if a debugger (such as gDEBugger) is being used or not (if OpenGL calls are being caught)? I’d like to be able to detect this and not start my application if a debugger is found so that shader code and textures cannot be ripped.

I have seen some other applications that do this but not sure how.


well i guess you could always check the version information from opengl32.dll (i assume you are using windows) because as we all know MS don’t give a s**t about opengl so it ain’t updated too often :wink: … this method should work against say GLIntercept. You could even note the exact file size of the official opengl32.dll and check that too.

For gDEBugger you should be able to query with the win32 api if gDEBugger is already running.

This may point you in the right direction:

i should actually warn you about using the first method because if MS happen to change a version number,or anything like that in a future revision of update than your app won’t run. Just be careful.

Try to enumerate all process DLL-s and check path for opengl32.dll. It should be in %SYSTEM% folder.

Also… upon gl context creation grab first 5 bytes of SwapBuffers function. Later just check that. Using dll injection some utils (like fraps or taksi) hooks on SwapBuffers. I suppose debuger tools usually hooks on SwapBuffers too.