iDevGames Forums
Screen capture with GL - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Screen capture with GL (/thread-6023.html)

Screen capture with GL - ianarcher - Dec 17, 2004 09:35 AM

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.

Screen capture with GL - arekkusu - Dec 17, 2004 02:03 PM

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 to figure out what private APIs to use. For starters:
nm /Applications/Utilities/ | grep _CG
You're on your own reverse engineering the parameter types. And forget about forwards compatibility...

Screen capture with GL - Duane - Dec 17, 2004 03:39 PM

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.