View Full Version : fast copying between contexts

05-04-2005, 02:56 PM
What's a fast way of copying pixels between an offscreen and an onscreen context in the framebuffer?

I'd like to do some slow rendering into about ten screen-sized offscreen contexts in the framebuffer, then copy them, one at a time, to a full-screen context very quickly, i.e., about one vertical refresh per image. (This is for experiments on visual perception, hence the need for a short but very accurately timed movie.)

I've tried this by rendering into screen-sized offscreen contexts in system memory, then using glDrawPixels to move the images into the full-screen context, but this is too slow.

Is this what pbuffers are for? Can I render into pbuffers in the frame buffer, then copy from the pbuffer to the full-screen context? If so, what's the appropriate copy function? (If I understand correctly, glCopyPixels only moves pixels within a single context.)

If it's relevant, I'm working in OS X (10.3).

Any help would be greatly appreciated.