   glSwapBuffers
  Who knows why glSwapBuffers takes as much as some milliSecs to run? What does it do exactly? I expected something like pointers exchange but I'm afraid it moves the content of the buffers. Am I right?Thanks   
  glSwapBuffers will execute all pending commands, It might wait for vertical retrace. As for the swap itself, it's configurable but most probably something like a pointer exchange.HTH.   ;  I omitted to say that my scene is totally empty, vertical sync is disabled, I'm using a direct rendering context and my code simply is:while (1) { glXSwapBuffers(...); }It can't be just an exchange...   ;  Unless you're shipping this application, don't bother. Profile when you have a real problem.EDIT:Quote:I'm using a direct rendering contextAs in single buffered rendering? If so why are you calling glXSwapBuffers?   ;  No, direct rendering means it bypasses the X server fluff and is hw accelerated.With indirect rendering, you don't get hw accel.   ;  doubble buffered modeGLint   att[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, GLX_DOUBLEBUFFER, None };...vi = glXChooseVisual(dpy, 0, att);I don't understend why glXSwapBuffers is so slow if hw acc. is enabled ! :S   