Vista Opengl Screenshot


I´m working on a small application that takes screenshots of an Opengl game (Counter Strike), but i have run into some problems when running my program on Vista.

The problem i that my program returns a pitch-black image when the game is running in full-screen, everything works fine when it is run in Window-mode.

I have done some research and found out that GDI operations on OpenGL windows do not work under Vista.

What other possibilities are there to make this work under Vista. Is it posible to make som kind of Opengl hook?
Is it possible to “hijack” the glReadPixels from the Game??

I´m open to all suggestions, and grateful for all of your answers.

What happen if you disable Windows Aero?

I´m afraid that doesn´t make any difference.

have the same problem and would be very interested in a solution!


For a quake engine game the console command “/screenshot” might do the trick. (May need to run as administrator to save.)

Otherwise for general purpose screen grabbing you might look at fraps or taksi but I don’t think either will work in aero mode.

I´m currently working on a solution that involves using the UltraVnc Mirror driver In theory this should work but i haven´t had any success when running the examples provided with the UVNC MD SDK.

I´m grateful for all of your answers and open to any suggestions.

Take look in TAKSI project on sourceforge. Its a Fraps like app. What you can do is to hijack app, inject your dll, which finds SwapBuffers call, copy and overwrite first 5 bytes of that function with pointer to your SwapBuffers. Your SwapBuffers should perform glReadPixels, save screenshot and then call original SwapBuffers.

Another solution is to use glIntercept (google fo it) put custop Opengl32.dll in app folder which internally load original OpenGL32.dll and intercept all gl calls. This tool have hotkey for taking screenshots.