put the RefractiveIndex::_vidGrabber.grabFrame(); // in each class

david's solution for the black frames...
This commit is contained in:
Jamie Allen
2012-02-20 20:24:25 +01:00
parent e1e4e15529
commit 2bd7704f38
9 changed files with 62 additions and 4 deletions
+5 -2
View File
@@ -189,13 +189,15 @@ void RefractiveIndex::state_analysis()
void RefractiveIndex::update()
{
state_analysis();
/*
RefractiveIndex::_vidGrabber.grabFrame(); // get a new frame from the camera
if (_vidGrabber.isFrameNew())
{
_pixels = _vidGrabber.getPixelsRef(); //get ofPixels from the camera
}
*/
}
void RefractiveIndex::draw()
@@ -213,7 +215,8 @@ void RefractiveIndex::setup_camera()
ofLog(OF_LOG_ERROR) << "RefractiveIndex::setup_camera - could not initialise grabber";
return;
}
_vidGrabber.setUseTexture(false);
_vidGrabber.listDevices();
_vidGrabber.setVerbose(true);
_vid_stream_open = true;