Exemple #1
0
static void cleanup(void)
{
	free(gARTsaveImage); gARTsaveImage = NULL;
	arglCleanup(gArglSettings);
	arVideoCapStop();
	arVideoClose();
}
static void Quit(void)
{
	arglCleanup(gArglSettings);
	arVideoCapStop();
	arVideoClose();
	exit(0);
}
Exemple #3
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();
}
static void Quit(void)
{
	arglCleanup(gArglSettings);
	arVideoCapStop();
	arVideoClose();
#ifdef _WIN32
	CoUninitialize();
#endif
	exit(0);
}
Exemple #5
0
static void cleanup(void)
{
	arglCleanup(gArglSettings);
    gArglSettings = NULL;
	arPattDetach(gARHandle);
	arPattDeleteHandle(gARPattHandle);
	arVideoCapStop();
	ar3DDeleteHandle(&gAR3DHandle);
	arDeleteHandle(gARHandle);
    arParamLTFree(&gCparamLT);
	arVideoClose();
}
Exemple #6
0
void CWindow::Quit(void)
{
	arglCleanup(arglSettings);

	for(int i = 0; i < webCamNum; i++) {
		webCamList[i]->Quit();
		delete webCamList[i];
	}

	delete webCamList;

	webCamNum = 0;

	glutDestroyWindow(0);
}
Exemple #7
0
//======================
// ライブラリの終了処理
//======================
void cARTK::cleanup( void )
{
	if( m_pARTImage )
	{
		free( m_pARTImage );
		m_pARTImage = NULL;
	}

	if( m_pArglSettings )
	{
		arglCleanup( m_pArglSettings );
		m_pArglSettings = NULL;
	}
	arVideoCapStop();
	arVideoClose();
}
//
// This is called whenever the OpenGL context has just been created or re-created.
// Note that GLSurfaceView is a bit asymmetrical here; we don't get a call when the
// OpenGL context is about to be deleted, it's just whipped out from under us. So it's
// possible that when we enter this function, we're actually resuming after such an
// event. What about resources we allocated previously which we didn't get time to
// free? Well, we don't have to worry about the OpenGL resources themselves, they
// were deleted along with the context. But, we should clean up any data structures we
// allocated with malloc etc. ARGL's settings falls into this category.
//
JNIEXPORT void JNICALL JNIFUNCTION_NATIVE(nativeSurfaceCreated(JNIEnv * env, jobject object))
{
    LOGD("nativeSurfaceCreated\n");

    glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

    glStateCacheFlush();     // Make sure we don't hold outdated OpenGL state.

    if (gArglSettings)
    {
        arglCleanup(gArglSettings);         // Clean up any left-over ARGL data.
        gArglSettings = NULL;
    }

    gARViewInited = false;
}
Exemple #9
0
//
// This is called whenever the OpenGL context has just been created or re-created.
// Note that GLSurfaceView is a bit asymmetrical here; we don't get a call when the
// OpenGL context is about to be deleted, it's just whipped out from under us. So it's
// possible that when we enter this function, we're actually resuming after such an
// event. What about resources we allocated previously which we didn't get time to
// de-allocate? Well, we don't have to worry about the OpenGL resources themselves, they
// were deleted along with the context. But, we should clean up any data structures we
// allocated with malloc etc. ARGL's settings falls into this category.
//
JNIEXPORT void JNICALL JNIFUNCTION_NATIVE(nativeSurfaceCreated(JNIEnv* env, jobject object))
{
#ifdef DEBUG
    LOGI("nativeSurfaceCreated\n");
#endif        
	glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

	glStateCacheFlush(); // Make sure we don't hold outdated OpenGL state.

	if (gArglSettings) {
		arglCleanup(gArglSettings); // Clean up any left-over ARGL data.
		gArglSettings = NULL;
	}
	VirtualEnvironmentFinal(); // Clean up any left-over OSG data.
	
    gARViewInited = false;
}
Exemple #10
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
}
Exemple #11
0
//======================
// ライブラリの終了処理
//======================
void cARTK::cleanup( void )
{
	if( m_pArglSettings )
	{
		arglCleanup( m_pArglSettings );
		m_pArglSettings = NULL;
	}

	if( m_pNyARInst )
	{
		nyar_NyARTransMat_O2_free( m_pNyARInst );
		m_pNyARInst = NULL;
	}

	arVideoCapStop();
	arVideoClose();
}
Exemple #12
0
//
// This is called whenever the OpenGL context has just been created or re-created.
// Note that GLSurfaceView is a bit asymmetrical here; we don't get a call when the
// OpenGL context is about to be deleted, it's just whipped out from under us. So it's
// possible that when we enter this function, we're actually resuming after such an
// event. What about resources we allocated previously which we didn't get time to
// de-allocate? Well, we don't have to worry about the OpenGL resources themselves, they
// were deleted along with the context. But, we should clean up any data structures we
// allocated with malloc etc. ARGL's settings falls into this category.
//
JNIEXPORT void JNICALL JNIFUNCTION_NATIVE(nativeSurfaceCreated(JNIEnv* env, jobject object))
{
#ifdef DEBUG
    LOGI("nativeSurfaceCreated\n");
#endif        
	glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

	glStateCacheFlush(); // Make sure we don't hold outdated OpenGL state.

	if (gArglSettings) {
		arglCleanup(gArglSettings); // Clean up any left-over ARGL data.
		gArglSettings = NULL;
	}
	
	program = 0; // The shader program was deleted, so mark it as needing to be recreated.

    gARViewInited = false;
}
Exemple #13
0
static void cleanup(void)
{
    VirtualEnvironmentFinal();

    if (markersNFT) deleteMarkers(&markersNFT, &markersNFTCount);
    
    // NFT cleanup.
    unloadNFTData();
	ARLOGd("Cleaning up ARToolKit NFT handles.\n");
    ar2DeleteHandle(&ar2Handle);
    kpmDeleteHandle(&kpmHandle);
    arParamLTFree(&gCparamLT);

    // OpenGL cleanup.
    arglCleanup(gArglSettings);
    gArglSettings = NULL;
    
    // Camera cleanup.
	arVideoCapStop();
	arVideoClose();
}
Exemple #14
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();
}
Exemple #15
0
static void cleanup(void)
{
    if (markersNFT) deleteMarkers(&markersNFT, &markersNFTCount);
    
    // NFT cleanup.
    unloadNFTData();
	ARLOGd("Cleaning up ARToolKit NFT handles.\n");
    ar2DeleteHandle(&ar2Handle);
    kpmDeleteHandle(&kpmHandle);
    arParamLTFree(&gCparamLT);

    // OpenGL cleanup.
    arglCleanup(gArglSettings);
    gArglSettings = NULL;
    
    // Camera cleanup.
	arVideoCapStop();
	arVideoClose();
#ifdef _WIN32
	CoUninitialize();
#endif
}
Exemple #16
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();
}