Here's some code...
OpenCV
GLUT & OpenCV : quick demo code to show how to associate OpenCV & Glut. (Notice that we use freeglut and not the original Glut, since that later has is own way to deal with the mainloop()).
The idea is to make OpenCV do all of his work on an IplImage, and then use this image as a texture in OpenGL.
Files:
freeglut-bin.zip : Precompiled win32 binaries of freeglut (includes .h and .lib)
glLK.c : Port of lkdemo.c from the OpenCV samples to use OpenGL (via GLUT)