Problem
We’re working on a project at Rieke Lab that has some staunch video timing and reliability requirements. We need to deliver frames without any underruns, and to know the exact moment they’re actually displayed on the screen. This requires that our rendering code runs strictly between refreshes, and that the back buffer is swapped in at the right moment.
Cocoa, OpenGL, and CoreVideo are the tools we picked, and it’s been tricky setting them up and understanding their roles. Hopefully this post will save someone the effort of getting them working together.
There is a CoreVideoOpenGLView subclass of NSOpenGLView attached to this post that I believe achieves our aims while drawing full-screen 2D animations.
Read on for details…
Attached Files:
- PyOpenGLTinker
Working XCode project integrating OpenGL, Cocoa, Python, and CoreVideo to draw 2D animation.


