#include <Carbon/Carbon.h>
#include <OpenGL/OpenGL.h>
int main()
{
/*
// The functions called here are deprecated and can't be used anymore
// as direct access to the framebuffer is no longer allowed
char val = 0;
char *fb = (char *)CGDisplayAddressForPosition(kCGDirectMainDisplay, 0, 0);
int rowbytes = CGDisplayBytesPerRow(kCGDirectMainDisplay);
printf("hereA\n");
//CGDisplayCaptureWithOptions(kCGDirectMainDisplay, kCGCaptureNoFill);
CGDisplayCapture(kCGDirectMainDisplay);
for (int j=0;j<50;j++)
{
for (int i=0;i<rowbytes;i++)
{
*fb++ = val++;
//val = *fb++;
}
}
CGDisplayRelease(kCGDirectMainDisplay);
printf("hereB\n");
*/
return 0;
}