#include "VideoWin.h" VideoWin::VideoWin() { setIdleInterval(30); vidInfo = vidInit(); vidGetXYSize(vidInfo,&imageWidth, &imageHeight); glutReshapeWindow(imageWidth, imageHeight); pixels=NULL; } VideoWin::~VideoWin() { } void VideoWin::idle() { if (vidInfo!=NULL) { pixels = (unsigned char *)vidInLatest(vidInfo); glutPostRedisplay(); } } void VideoWin::display() { if (pixels!=NULL) glDrawPixels(imageWidth, imageHeight,GL_ABGR_EXT ,GL_UNSIGNED_BYTE,pixels); }