void Y_camera_obj(int argc) { tCamera *camera = (tCamera *) ypush_obj(&camera_yObj, sizeof(tCamera)); // memset(handle,0,sizeof(tCamera)); try { // initialise the Prosilica API if (!PvInitialize()) { // wait for a camera to be plugged waitForCamera(); // get a camera from the list cameraGet(camera); // setup the camera cameraSetup(camera); } else { throw "failed to initialise the API\n"; } } catch ( string msg ) { y_error(msg.c_str()); } catch ( char const * msg ) { y_error(msg); } }
int main(int argc, char **argv) { initThirdParty(&argc, &argv); atexit(&CleanUp); glutSetup(); cameraSetup(); toolBoxSetup(); // Run GLUT loop and hence the application glutMainLoop(); return 0; }