Ross
Ross

Reputation: 14415

Is it possible to intercept the image data of Mac OSX Screen?

I would like to access the whole contents of a Mac OSX screen, not to take a screenshot, but modify the final (or final as possible) rendering of the screen.

Can anyone point me in the direction of any Cocoa / Quartz or other, API documentation on this? In a would like to access manipulate part of the OSX render pipeline, not for just one app but the whole screen.

Thanks Ross

Edit: I have found CGGetDisplaysWithOpenGLDisplayMask. Wondering if I can use OpenGL shaders on the main screen.

Upvotes: 2

Views: 442

Answers (1)

Ben Stiglitz
Ben Stiglitz

Reputation: 4004

You can't install a shader on the screen, as you can't get to the screen's underlying GL representation. You can, however, access the pixel data.

Take a look at CGDisplayCreateImageForRect(). In the same documentation set you'll find information about registering callback functions to find out when certain areas of the screen are being updated.

Upvotes: 3

Related Questions