View Full Version : Window out of sync
05-06-2003, 09:04 AM
I am rendering an animation into a window. Each frame, I draw the scene, then read the pixels into a byte array, then I create a windows rgn from this byte array.
It works great, but it seems the rgn is 1 frame behind.
Any one have an idea?
05-06-2003, 11:26 PM
Could be a double buffer related problem, but it shouldnt, you copy data from the same buffer that you render to so you should get the same stuff as you render as long as you copy the contents at the end of the rendering step.
05-07-2003, 06:23 AM
Yeah, I thought about the double buffering also, but that didnt make any sense. I even call glFinish to force all drawing, but it still doesnt work.
This is the order of what I do:
I draw the scene,
I read the pixels,
I swap the buffers,
I create the new region
I suppose it doesnt matter whether I create the region before or after the swapbuffers call....
05-07-2003, 10:13 AM
When I call getIntegerv with gl_read_buffer as an arg, shouldnt i get glFront if I call it after swap buffers?
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.