Screen Capture with Open GL using glReadPixels

Posted by Raja on Stack Overflow See other posts from Stack Overflow or by Raja
Published on 2011-02-28T12:57:12Z Indexed on 2011/02/28 15:25 UTC
Read the original article Hit count: 359

Filed under:
|
|

Hi,

I created a CGRegisterScreenRefreshCallback(refreshCallback, NULL) and in the refreshCallback method get the list of rectangles which have changed.

I am getting the rectangle data from frameBuffer using OpenGL glReadPixels.

Is there a better way of screen capture either with/without opengl and also using OpenGL can I skip reading pixel by pixel ?

I have looked at glGetTexImage and glCopyTexSubImage2D. Any simple code block which can explain how to use these functions to get the changed rectangle data would be very helpful ?

Thanks, Raja.

© Stack Overflow or respective owner

Related posts about mac

Related posts about opengl