I'd like to "hook" into a running game, say Mario Bros, and capture each frame rendered... saving that frame to an image file. A good example of something similar is FRAPS. --Note: I don't want to capture the whole screen/desktop. I want to capture a targeted window.
I have had a look at OBS (Open Broadcasting Software) but it is not particularly fast. Don't get me wrong, it's great software, but unfortunately there is no/poor documentation, making a massive project written in c and c++ nearly inaccessible for a new-to-c++ programmer.
I've also had a look at GamingAnywhere, but unfortunately, I am unable to get it to work, there is very little/no documentation, runs in VS2010 only and is messy (with poor variable naming). However, it is a research project and so it is understandably undocumented and messy.
I know that this can be done with OpenGL, GDI and with Direct3D, but I am unable to find some good examples on the net.
I read that glReadlPixels (using OpenGL) can be used and I've read the documentation, but the post mentioned nothing about hooking into a running game/application graphics.
Questions:
Can I hook into the graphics of a game developed with OpenGL, using, say, Direct3D? Does the library used for hooking have to be the same as the one used by the game?
How do I hook into the game's rendered frames so that I can output those frames to image files or to a video file? (Just some links or brief explanation of what I need to do would be great)
BackBuffer - I read that it is very fast accessing the BackBuffer to retrieve the frames. Does someone have an example for me on how to do this with the latest libraries? I have found that most examples are out of date.
For my purposes, is there any clearly "this is faster than that"? What I mean is, would, say, OpenGL, be faster for my purposes?
If someone knows of an open-source project (that does essentially what I need) that is actively developed and well documented, I'd love to know about it.