Triple buffering?

I’m on X11, and trying to work out the correct way to use triple-buffering (in the sense that I just keep rendering frames and when refresh time comes around the newest complete one is actually used, in its entirity).

The best hypothesis I’ve come up with is that it’s handled entirely by X11 (via “Option TripleBuffer true” in xorg.conf) and my application should disable vsync to make use of it (otherwise SDL_GL_SwapWindow pauses for the rest of the frame, which isn’t what I want). Is that correct?

Also, does anyone have any hints on working out whether triple-buffering is working? My plan at the moment is to write a particularly tearing-prone but fast program, eyeball whether it does tear and measure the FPS (rendered):

  • FPS == 60 => double buffer
  • FPS >> 60, tearing => single buffer
  • FPS >> 60, no tearing => triple buffer

As a method, it’s a bit shaky. Any better ideas?