# How double-buffers works in opengl?

As I understand, the back-buffer is used for rendering the image while the front-buffer is drawn on the screen. So if you have only one image to be drawn on the screen, then you only need to swap the buffers one time because in the second swap the image is already drawn and there is no point to draw the same image again. However, when I tried to swap buffers no more than 2 times the graphics slow down a lot and move the window from one position to another takes 10-20 seconds. My question is... Why? How double-buffers works then?

• @NicolBolas Well OK, if you're going into a compositor, there will probably be a copy somewhere along the line. I was more thinking of the case where the output is going into the display controller directly. My point is that OP was thinking that each eglSwapBuffers or equivalent is pausing while it copies a bunch of data, but the problem is something completely different. – Dan Hulme Jan 16 '17 at 16:43