Quote:
Originally Posted by CardcaptorRLH85
Is there any way that we could see a sample of your newImageAvailable() function Kruuzr? I'm looking at the GetImage() function but I see it returning an int (1 for success and -1 for failure). Not the double timestamp.
|
Sorry I didn't get back to you earlier. (Last build night already started).
I don't have the code in front of me, but I believe the two parameters for GetImage() are Image* and double*. It may get the image into your Image* param but it also puts the timestamp into your double. The code looks something like this:
Image* image; // created using frcCreateImage() somewhere else
bool newImageAvailable()
{
double timestamp;
static double lastTimestamp = 0.0;
GetImage( image, ×tamp );
if ( timestamp > lastTimestamp )
{
lastTimestamp = timestamp;
return true;
}
return false;
}
I may have missed something but I think that's it.
Steve C.