title: OpenGL/D3D: How do I get a screen grab of a game running full screen in Windows?
body: <p>Suppose I have an OpenGL game running full screen (Left 4 Dead 2). I'd like to programmatically get a screen grab of it and then write it to a video file. </p>
  
  <p>I've tried GDI, D3D, and OpenGL methods (eg glReadPixels) and either receive a blank screen or flickering in the capture stream.</p>
  
  <p>Any ideas?</p>
  
  <p>For what it's worth, a canonical example of something similar to what I'm trying to achieve is Fraps.</p>