I'm trying to render video on a GL quad using a QGLWidget but I am experiencing tearing in the video. I'm not an OpenGL expert.

I set the option QGL:oubleBuffers in the constructor and the first thing I do is makeCurrent().

I try to synchronize the application frame rate to the monitor refresh rate, following the advice in http://lists.trolltech.com/qt-intere.../msg00313.html - it's Mac OS X specific unfortunately; I'll repeat it here for completeness:
Qt Code:
  1. AGLContext aglContext;
  2. aglContext = aglGetCurrentContext();
  3. GLint swapInt = 1;
  4. aglSetInteger(aglContext, AGL_SWAP_INTERVAL, &swapInt);
To copy to clipboard, switch view to plain text mode 
This helps a little but the tearing is still present.

In the paintEvent I bind the next frame texture. I use a timerEvent to call update and then preload the next frame.

Any help gratefully appreciated.