PDA

View Full Version : Vista Opengl Screenshot



gocca
11-19-2009, 08:00 PM
Hi!

Im 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. http://www.opengl.org/pipeline/article/vol003_7/

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

Im open to all suggestions, and grateful for all of your answers.

overlay
11-19-2009, 08:50 PM
What happen if you disable Windows Aero?

gocca
11-20-2009, 06:45 AM
What happen if you disable Windows Aero?


Im afraid that doesnt make any difference.

Vincent09
11-26-2009, 05:05 PM
have the same problem and would be very interested in a solution!

regards
Vincent

Brolingstanz
11-26-2009, 10:23 PM
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.

gocca
12-01-2009, 09:24 AM
Im currently working on a solution that involves using the UltraVnc Mirror driver http://www.uvnc.com/features/driver.html. In theory this should work but i havent had any success when running the examples provided with the UVNC MD SDK.

Im grateful for all of your answers and open to any suggestions.

yooyo
12-02-2009, 04:46 AM
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.