Waiting for the wind

programming memo in different platforms

Archive for 2011 年 12 月

Grab Screen from Mac OS X Lion(10.7)

發文作者 cotton5415 於 十二月 29, 2011

Mac OS X Lion seams disable OpenGL screen. So, glReadPixel can’t get screen shot.
The solution to grab the screen:
CGImageRef image = CGDisplayCreateImage(kCGDirectMainDisplay);

發表於 MAC OS X's Road | 已加上的標籤: , , , , , , , , , , | 張貼留言 »

 
Follow

Get every new post delivered to your Inbox.