static void finish_and_shutdown() { fprintf(stderr, "%s: shutdown\n",exename); dp_shutdown(); /* In the non-automanage case, should really destroy app context here */ exit(0); }
/* * Function: destroy_gsm_thread * Description: shutdown gsm and kill gsm thread * Parameters: none * Returns: none */ void destroy_gsm_thread() { static const char fname[] = "destroy_gsm_thread"; DEF_DEBUG(DEB_F_PREFIX"Unloading GSM and destroying GSM thread\n", DEB_F_PREFIX_ARGS(SIP_CC_INIT, fname)); gsm_shutdown(); dp_shutdown(); (void) cprDestroyThread(gsm_thread); }
main() { /* Initialize renderer */ ERRCHK( dp_init_ren("myrenderer","p3d","example_3.p3d", "This string will be ignored") ); /* Create my lights and camera */ ERRCHK( dp_open("mylights") ); ERRCHK( dp_ambient(&ambcolor) ); ERRCHK( dp_light(&lightloc, &lightcolor) ); ERRCHK( dp_close() ); ERRCHK( dp_camera( "mycamera", &lookfrom, &lookat, &up, fovea, hither, yon ) ); /* Create the water molecule */ create_h2o(); /* Render the model */ ERRCHK( dp_snap("h2o","mylights","mycamera") ); /* Shut down renderer */ ERRCHK( dp_shutdown() ); }