コード例 #1
0
ファイル: prosilica.cpp プロジェクト: nono031/yProsilica
  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);
    }

  }
コード例 #2
0
ファイル: main.cpp プロジェクト: vlopezsa/code
int main(int argc, char **argv)
{
    initThirdParty(&argc, &argv);
    atexit(&CleanUp);

    glutSetup();

    cameraSetup();

    toolBoxSetup();

    // Run GLUT loop and hence the application
    glutMainLoop();   

    return 0;
}