Screen Capture with Open GL using glReadPixels
- by Raja
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.