Screen capture with GL
Hi all,
I'm working on screen capture functionality using GL. I can do full screen ok, but what I'd really like to do is grab the pixels from individual windows, even if they're being covered by other windows (in other words, not just a portion of the screen, but portions beneath topmost windows).
Mac OS X's "Grab" utility does this, so I know it's possible. Any advice in this area would be much appreciated.
I'm working on screen capture functionality using GL. I can do full screen ok, but what I'd really like to do is grab the pixels from individual windows, even if they're being covered by other windows (in other words, not just a portion of the screen, but portions beneath topmost windows).
Mac OS X's "Grab" utility does this, so I know it's possible. Any advice in this area would be much appreciated.
It's possible for Apple, but there's no publicly documented way to get at the backing store bits maintained by the window manager. You'll have to hack Grab.app to figure out what private APIs to use. For starters:
You're on your own reverse engineering the parameter types. And forget about forwards compatibility...
Code:
nm /Applications/Utilities/Grab.app/Contents/MacOS/Grab | grep _CG
if this is in cocoa, again, i can provide it. One problem found was that grab could not take screenshots of windows, but could with fullscreen.
It's not magic, it's Ruby.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL full screen mode leaves garbage on screen when exiting app | Malarkey | 5 | 4,459 |
Nov 19, 2008 12:51 PM Last Post: Malarkey |
|
| Full Screen Key Capture Issues | kodex | 2 | 2,187 |
Dec 28, 2005 12:01 PM Last Post: kodex |
|

