示例#1
0
// cleanup();
JNIEXPORT jboolean JNICALL JNIFUNCTION_NATIVE(nativeStop(JNIEnv* env, jobject object))
{
#ifdef DEBUG
    LOGI("nativeStop\n");
#endif
    int i, j;
    
	// Can't call arglCleanup() here, because nativeStop is not called on rendering thread.

    // Clean up ARToolKit data.
    if (ar3DHandle) ar3DDeleteHandle(&ar3DHandle);
    if (arHandle) {
        arPattDetach(arHandle);
        arDeleteHandle(arHandle);
        arHandle = NULL;
    }
    arParamLTFree(&gCparamLT);
    
    // OpenGL cleanup -- not done here.
    
    // Video cleanup.
    if (gVideoFrame) {
        free(gVideoFrame);
        gVideoFrame = NULL;
        gVideoFrameSize = 0;
    }
    ar2VideoClose(gVid);
    gVid = NULL;
    videoInited = false;

    return (true);
}
示例#2
0
static void cleanup(void)
{
	arglCleanup(gArglSettings);
    gArglSettings = NULL;
	arPattDetach(gARHandle);
	arPattDeleteHandle(gARPattHandle);
	arVideoCapStop();
	ar3DDeleteHandle(&gAR3DHandle);
	arDeleteHandle(gARHandle);
    arParamLTFree(&gCparamLT);
	arVideoClose();
}
示例#3
0
ARTApp::~ARTApp()
{
	arPattDetach(arHandle);
	arPattDeleteHandle(pattHandle);
	arVideoCapStop();
	ar3DDeleteHandle(&ar3DHandle);
	arDeleteHandle(arHandle);
	arParamLTFree(&cParam);
	arVideoClose();

	if (objModel)
		glmDelete(objModel);
}
示例#4
0
void ofxArtool5::cleanup(){
    if(artMode==ART_PATTERN){
        arPattDetach(gARHandle);
        arPattDeleteHandle(gARPattHandle);
        ar3DDeleteHandle(&gAR3DHandle);
        arDeleteHandle(gARHandle);
        arParamLTFree(&gCparamLT);
    }else if(artMode==ART_NFT){
        if(markersNFT)deleteMarkers(&markersNFT, &markersNFTCount);
        unloadNFTData();
        ar2DeleteHandle(&ar2Handle);
        kpmDeleteHandle(&kpmHandle);
        arParamLTFree(&gCparamLT);
    }
}
示例#5
0
static void cleanup(void)
{
    if (gObjectData) {
        arPattDetach(gARHandle);
        arPattDeleteHandle(gObjectData->pattHandle);
    }
    arglCleanup(gArglSettings);
    gArglSettings = NULL;
    arVideoCapStop();
    ar3DDeleteHandle(&gAR3DHandle);
    arDeleteHandle(gARHandle);
    arParamLTFree(&gCparamLT);
    arVideoClose();
#ifdef _WIN32
    CoUninitialize();
#endif
}
示例#6
0
static void cleanup(void)
{
    // Dispose of movie drawing structures, and stop and close the movie file.
    arglCleanup(gMovieArglSettings);
    gMovieArglSettings = NULL;
    if (gMovieVideo) {
        ar2VideoCapStop(gMovieVideo);
        ar2VideoClose(gMovieVideo);
    }    
	arglCleanup(gArglSettings);
    gArglSettings = NULL;
	arPattDetach(gARHandle);
	arPattDeleteHandle(gARPattHandle);
	arVideoCapStop();
	ar3DDeleteHandle(&gAR3DHandle);
	arDeleteHandle(gARHandle);
    arParamLTFree(&gCparamLT);
	arVideoClose();
}
示例#7
0
static void cleanup(void)
{
    int i;

    arglCleanup(gArglSettings);
    gArglSettings = NULL;

    arPattDetach(gARHandle);

    for (i = 0; i < gMultiConfigCount; i++)
    {
        arMultiFreeConfig(gMultiConfigs[i]);
    }

    if (gARPattHandle)
        arPattDeleteHandle(gARPattHandle);

    arVideoCapStop();
    arDeleteHandle(gARHandle);
    arParamLTFree(&gCparamLT);
    arVideoClose();
}
示例#8
0
static void cleanup(void)
{
	VirtualEnvironmentFinal();

    if (markersSquare) deleteMarkers(&markersSquare, &markersSquareCount, gARPattHandle);
    
    // Tracking cleanup.
    if (gARPattHandle) {
        arPattDetach(gARHandle);
		arPattDeleteHandle(gARPattHandle);
	}
	ar3DDeleteHandle(&gAR3DHandle);
	arDeleteHandle(gARHandle);
    arParamLTFree(&gCparamLT);

    // OpenGL cleanup.
    arglCleanup(gArglSettings);
    gArglSettings = NULL;
    
    // Camera cleanup.
	arVideoCapStop();
	arVideoClose();
}